1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package foo;
18 
19 import androidx.lifecycle.GeneratedAdapter;
20 import androidx.lifecycle.Lifecycle;
21 import androidx.lifecycle.LifecycleOwner;
22 import androidx.lifecycle.MethodCallsLogger;
23 import java.lang.Override;
24 import javax.annotation.Generated;
25 
26 @Generated("androidx.lifecycle.LifecycleProcessor")
27 public class InheritanceOk3Derived_LifecycleAdapter implements GeneratedAdapter {
28   final InheritanceOk3Derived mReceiver;
29 
InheritanceOk3Derived_LifecycleAdapter(InheritanceOk3Derived receiver)30   InheritanceOk3Derived_LifecycleAdapter(InheritanceOk3Derived receiver) {
31     this.mReceiver = receiver;
32   }
33 
34   @Override
callMethods(LifecycleOwner owner, Lifecycle.Event event, boolean onAny, MethodCallsLogger logger)35   public void callMethods(LifecycleOwner owner, Lifecycle.Event event, boolean onAny,
36       MethodCallsLogger logger) {
37     boolean hasLogger = logger != null;
38     if (onAny) {
39       return;
40     }
41     if (event == Lifecycle.Event.ON_STOP) {
42       if (!hasLogger || logger.approveCall("onStop", 2)) {
43         mReceiver.onStop(owner);
44       }
45       return;
46     }
47   }
48 }
49