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 package test.library 17 18 import androidx.lifecycle.GeneratedAdapter 19 import androidx.lifecycle.Lifecycle.Event 20 import androidx.lifecycle.LifecycleOwner 21 import androidx.lifecycle.MethodCallsLogger 22 import javax.annotation.Generated 23 24 @Generated(value = ["androidx.lifecycle.LifecycleProcessor"]) 25 class ObserverNoAdapter_LifecycleAdapter internal constructor(receiver: ObserverNoAdapter) : 26 GeneratedAdapter { 27 val receiver: ObserverNoAdapter = receiver 28 callMethodsnull29 override fun callMethods( 30 owner: LifecycleOwner, 31 event: Event, 32 onAny: Boolean, 33 logger: MethodCallsLogger 34 ) { 35 val hasLogger = logger != null 36 if (onAny) { 37 return 38 } 39 if (event === Event.ON_STOP) { 40 if (!hasLogger || logger.approveCall("doOnStop", 1)) { 41 receiver.doOnStop() 42 } 43 return 44 } 45 } 46 } 47