1 /*
2  * Copyright (C) 2016 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 static androidx.lifecycle.Lifecycle.Event.ON_STOP;
20 
21 import androidx.lifecycle.Lifecycle.Event;
22 import androidx.lifecycle.LifecycleObserver;
23 import androidx.lifecycle.LifecycleOwner;
24 import androidx.lifecycle.OnLifecycleEvent;
25 
26 class Base1 implements LifecycleObserver {
27     @OnLifecycleEvent(ON_STOP)
onStop(LifecycleOwner provider)28     public void onStop(LifecycleOwner provider) {
29     }
30 }
31 
32 class Proxy extends Base1 {
33 }
34 
35 class Derived1 extends Proxy {
36     @OnLifecycleEvent(ON_STOP)
onStop2(LifecycleOwner provider)37     public void onStop2(LifecycleOwner provider) {
38     }
39 }
40 
41 class Derived2 extends Proxy {
42     @OnLifecycleEvent(ON_STOP)
onStop2(LifecycleOwner provider)43     public void onStop2(LifecycleOwner provider) {
44     }
45 }
46 
47 class Base2 implements LifecycleObserver {
48     @OnLifecycleEvent(ON_STOP)
onStop(LifecycleOwner provider)49     public void onStop(LifecycleOwner provider) {
50     }
51 }
52 
53 class Derived3 extends Base2 {
54     @OnLifecycleEvent(ON_STOP)
onStop2(LifecycleOwner provider)55     public void onStop2(LifecycleOwner provider) {
56     }
57 }
58