From 66d874d96d5699bb090c59f47a5a528956ca053e Mon Sep 17 00:00:00 2001 From: Richard Uhler Date: Thu, 15 Jan 2015 09:37:19 -0800 Subject: Create OatFileAssistant class for assisting with oat files. The oat file assistant is used for determining whether dex2oat or patchoat is needed, for running dex2oat or patchoat as needed to make an oat file up to date, and to load dex files associated with a given dex location. The introduction of the OatFileAssistant class is meant to clean up and consolidate code related to the management of oat files that was duplicated and spread across dalvik_system_DexFile.cc and class_linker.cc. Bug: 11301553 Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8 --- test/MultiDex/Main.java | 22 ++++++++++++++++++++++ test/MultiDex/Second.java | 21 +++++++++++++++++++++ test/MultiDex/main.list | 1 + 3 files changed, 44 insertions(+) create mode 100644 test/MultiDex/Main.java create mode 100644 test/MultiDex/Second.java create mode 100644 test/MultiDex/main.list (limited to 'test/MultiDex') diff --git a/test/MultiDex/Main.java b/test/MultiDex/Main.java new file mode 100644 index 0000000000..659dba9af6 --- /dev/null +++ b/test/MultiDex/Main.java @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class Main { + public static void main(String args[]) { + Second second = new Second(); + System.out.println(second.getSecond()); + } +} diff --git a/test/MultiDex/Second.java b/test/MultiDex/Second.java new file mode 100644 index 0000000000..540aedbb1a --- /dev/null +++ b/test/MultiDex/Second.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class Second { + public String getSecond() { + return "I Second That."; + } +} diff --git a/test/MultiDex/main.list b/test/MultiDex/main.list new file mode 100644 index 0000000000..44ba78ead5 --- /dev/null +++ b/test/MultiDex/main.list @@ -0,0 +1 @@ +Main.class -- cgit v1.2.3