blob: 2056e2f2aa06b9041a01f9e50b4b6bb3471a55cc [file] [log] [blame]
Nicolas Geoffray9437b782015-03-25 10:08:51 +00001/*
Roland Levillain6a92a032015-07-23 12:15:01 +01002 * Copyright (C) 2015 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 */
Nicolas Geoffray9437b782015-03-25 10:08:51 +000016
17public class OtherDex {
18 public static void emptyMethod() {
19 }
20
21 public static int returnIntMethod() {
22 return 38;
23 }
24
25 public static int returnOtherDexStatic() {
26 return myStatic;
27 }
28
29 public static int returnMainStatic() {
30 return Main.myStatic;
31 }
32
33 public static int recursiveCall() {
34 return recursiveCall();
35 }
36
37 public static String returnString() {
38 return "OtherDex";
39 }
40
Andreas Gampe166aaee2016-07-18 08:27:23 -070041 public static Class<?> returnOtherDexClass() {
Nicolas Geoffray9437b782015-03-25 10:08:51 +000042 return OtherDex.class;
43 }
44
Andreas Gampe166aaee2016-07-18 08:27:23 -070045 public static Class<?> returnMainClass() {
Nicolas Geoffray9437b782015-03-25 10:08:51 +000046 return Main.class;
47 }
48
Andreas Gampe166aaee2016-07-18 08:27:23 -070049 private static Class<?> returnOtherDexClass2() {
Nicolas Geoffray9437b782015-03-25 10:08:51 +000050 return OtherDex.class;
51 }
52
Andreas Gampe166aaee2016-07-18 08:27:23 -070053 public static Class<?> returnOtherDexClassStaticCall() {
Nicolas Geoffray9437b782015-03-25 10:08:51 +000054 // Do not call returnOtherDexClass, as it may have been flagged
55 // as non-inlineable.
56 return returnOtherDexClass2();
57 }
58
Andreas Gampe166aaee2016-07-18 08:27:23 -070059 public static Class<?> returnOtherDexCallingMain() {
Nicolas Geoffray9437b782015-03-25 10:08:51 +000060 return Main.getOtherClass();
61 }
62
63 static int myStatic = 1;
64}