Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 594198b9 authored by Songchun Fan's avatar Songchun Fan
Browse files

[test] fix GoogleBluetoothInstrumentationTests

Non-data apps that have a sharedUserId shared with a privileged app and
use privileged permissions need to testOnly.

BUG: 243738091
Fixes: 243738091
BUG: 236173905
Test: atest GoogleBluetoothInstrumentationTests
Change-Id: I33ed22b844a07a4964e8da21ae83f7a71fd6dad8
parent 3bd86f3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@
         which is needed when building test cases. -->
         which is needed when building test cases. -->


    <application android:allowBackup="true"
    <application android:allowBackup="true"
                 android:autoRevokePermissions="disallowed">
                 android:autoRevokePermissions="disallowed" android:testOnly="true">
        <uses-library android:name="android.test.runner" />
        <uses-library android:name="android.test.runner" />
        <uses-library android:name="org.apache.http.legacy" android:required="false" />
        <uses-library android:name="org.apache.http.legacy" android:required="false" />
    </application>
    </application>
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="BluetoothInstrumentationTests.apk" />
        <option name="test-file-name" value="BluetoothInstrumentationTests.apk" />
        <option name="install-arg" value="-t" />
    </target_preparer>
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
+2 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />


    <application >
    <application android:testOnly="true">
        <uses-library android:name="android.test.runner" />
        <uses-library android:name="android.test.runner" />
    </application>
    </application>
    <instrumentation android:name="android.bluetooth.BluetoothTestRunner"
    <instrumentation android:name="android.bluetooth.BluetoothTestRunner"
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="BluetoothTests.apk" />
        <option name="test-file-name" value="BluetoothTests.apk" />
        <option name="install-arg" value="-t" />
    </target_preparer>
    </target_preparer>


    <option name="test-suite-tag" value="apct"/>
    <option name="test-suite-tag" value="apct"/>