Merge tag 'android-security-10.0.0_r53' into int/10/fp2

Android security 10.0.0 release 53

* tag 'android-security-10.0.0_r53':

Change-Id: I78dc84151e22915aebe488b9d1299abb44301f49
diff --git a/res/config/template/atest_local_min.xml b/res/config/template/atest_local_min.xml
new file mode 100644
index 0000000..3cde23f
--- /dev/null
+++ b/res/config/template/atest_local_min.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<!-- Common configuration for atest's local runs with minimum overhead. -->
+<configuration description="Common configuration for atest's local runs with minimum overhead">
+    <log_saver class="com.android.tradefed.result.ATestFileSystemLogSaver" />
+    <include name="template/local_min_base" />
+</configuration>
diff --git a/res/config/template/local_min.xml b/res/config/template/local_min.xml
index 3a5609c..9ad2534 100644
--- a/res/config/template/local_min.xml
+++ b/res/config/template/local_min.xml
@@ -13,24 +13,8 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<!-- Common base configuration for local runs with minimum overhead. -->
-<configuration description="Common base configuration for local runs with minimum overhead">
-    <build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
-    <target_preparer class="com.android.tradefed.targetprep.PreloadedClassesPreparer">
-        <option name="disable" value="true" />
-    </target_preparer>
-
-    <template-include name="preparers" default="empty" />
-
-    <template-include name="test" default="empty" />
-
-    <logger class="com.android.tradefed.log.FileLogger">
-        <option name="log-level" value="VERBOSE" />
-        <option name="log-level-display" value="VERBOSE" />
-    </logger>
+<!-- Common configuration for local runs with minimum overhead. -->
+<configuration description="Common configuration for local runs with minimum overhead">
     <log_saver class="com.android.tradefed.result.FileSystemLogSaver" />
-    <result_reporter class="com.android.tradefed.result.ConsoleResultReporter" />
-    <result_reporter class="com.android.tradefed.result.suite.SuiteResultReporter" />
-    <template-include name="reporters" default="empty" />
-    <template-include name="metrics_collector" default="empty" />
+    <include name="template/local_min_base"/>
 </configuration>
diff --git a/res/config/template/local_min_base.xml b/res/config/template/local_min_base.xml
new file mode 100644
index 0000000..f4f33e1
--- /dev/null
+++ b/res/config/template/local_min_base.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<!-- Common base configuration for local runs with minimum overhead. -->
+<configuration description="Common base configuration for local runs with minimum overhead">
+    <build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
+
+    <template-include name="preparers" default="empty" />
+
+    <template-include name="test" default="empty" />
+
+    <logger class="com.android.tradefed.log.FileLogger">
+        <option name="log-level" value="VERBOSE" />
+        <option name="log-level-display" value="VERBOSE" />
+    </logger>
+    <result_reporter class="com.android.tradefed.result.ConsoleResultReporter" />
+    <result_reporter class="com.android.tradefed.result.suite.SuiteResultReporter" />
+    <template-include name="reporters" default="empty" />
+    <template-include name="metrics_collector" default="empty" />
+</configuration>
diff --git a/src/com/android/app/tests/AppLaunchTest.java b/src/com/android/app/tests/AppLaunchTest.java
index af34c7a..35ebd30 100644
--- a/src/com/android/app/tests/AppLaunchTest.java
+++ b/src/com/android/app/tests/AppLaunchTest.java
@@ -18,6 +18,8 @@
 import com.android.tradefed.build.IAppBuildInfo;
 import com.android.tradefed.build.IBuildInfo;
 import com.android.tradefed.build.VersionedFile;
+import com.android.tradefed.config.IConfiguration;
+import com.android.tradefed.config.IConfigurationReceiver;
 import com.android.tradefed.device.DeviceNotAvailableException;
 import com.android.tradefed.device.ITestDevice;
 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric;
@@ -43,11 +45,13 @@
  * <p>Requires a {@link IAppBuildInfo} and 'aapt' being present in path. Assume the AppLaunch test
  * app is already present on device.
  */
-public class AppLaunchTest implements IDeviceTest, IRemoteTest, IBuildReceiver {
+public class AppLaunchTest
+        implements IDeviceTest, IRemoteTest, IBuildReceiver, IConfigurationReceiver {
 
     private static final String RUN_NAME = "AppLaunch";
     private ITestDevice mDevice;
     private IBuildInfo mBuild;
+    private IConfiguration mConfiguration;
 
     /** {@inheritDoc} */
     @Override
@@ -67,6 +71,12 @@
         mBuild = buildInfo;
     }
 
+    /** {@inheritDoc} */
+    @Override
+    public void setConfiguration(IConfiguration config) {
+        mConfiguration = config;
+    }
+
     /**
      * Installs all apks listed in {@link IAppBuildInfo}, then attempts to run the package in the
      * first apk. Note that this does <emph>not</emph> attempt to uninstall the apks, and requires
@@ -129,6 +139,7 @@
         i.setPackageName("com.android.applaunchtest");
         i.setRunnerName("com.android.applaunchtest.AppLaunchRunner");
         i.setDevice(getDevice());
+        i.setConfiguration(mConfiguration);
         i.addInstrumentationArg("packageName", packageName);
         i.run(listener);
         try (InputStreamSource s = getDevice().getScreenshot()) {
diff --git a/src/com/android/media/tests/CameraTestBase.java b/src/com/android/media/tests/CameraTestBase.java
index 41db51c..da7fed6 100644
--- a/src/com/android/media/tests/CameraTestBase.java
+++ b/src/com/android/media/tests/CameraTestBase.java
@@ -188,6 +188,7 @@
 
         InstrumentationTest instr = new InstrumentationTest();
         instr.setDevice(getDevice());
+        instr.setConfiguration(mConfiguration);
         instr.setPackageName(getTestPackage());
         instr.setRunnerName(getTestRunner());
         instr.setClassName(getTestClass());