1 /* 2 * 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 */ 16 17 public 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 41 public static Class<?> returnOtherDexClass() { 42 return OtherDex.class; 43 } 44 45 public static Class<?> returnMainClass() { 46 return Main.class; 47 } 48 49 private static Class<?> returnOtherDexClass2() { 50 return OtherDex.class; 51 } 52 53 public static Class<?> returnOtherDexClassStaticCall() { 54 // Do not call returnOtherDexClass, as it may have been flagged 55 // as non-inlineable. 56 return returnOtherDexClass2(); 57 } 58 59 public static Class<?> returnOtherDexCallingMain() { 60 return Main.getOtherClass(); 61 } 62 63 static int myStatic = 1; 64 } 65