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

Commit b4a5d783 authored by Evan Severson's avatar Evan Severson Committed by Android (Google) Code Review
Browse files

Merge "Move non ndk native tests from cts to coretests" into main

parents 97c43505 7a02a919
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ android_test {
        "libpowermanagertest_jni",
        "libviewRootImplTest_jni",
        "libworksourceparceltest_jni",
        "libAppOpsTest_jni",
    ],

    sdk_version: "core_platform",
@@ -139,6 +140,7 @@ android_test {
        ":com.android.cts.helpers.aosp",
        ":BinderProxyCountingTestApp",
        ":BinderProxyCountingTestService",
        ":AppThatUsesAppOps",
    ],
}

+6 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
          package="com.android.frameworks.coretests"
          android:sharedUserId="com.android.uid.test">

    <attribution android:tag="testAttribution" android:label="@string/testAttributionLabel" />

    <permission android:name="com.android.frameworks.coretests.permission.TEST_GRANTED"
        android:protectionLevel="normal"
            android:label="@string/permlab_testGranted"
@@ -41,6 +43,7 @@
    <uses-permission android:name="android.permission.ACCESS_FPS_COUNTER" />
    <uses-permission android:name="android.permission.DOWNLOAD_CACHE_NON_PURGEABLE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
@@ -167,6 +170,9 @@
    <uses-permission android:name="android.permission.MANAGE_ACCESSIBILITY" />
    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />

    <!-- AppOpsLoggingTest permissions -->
    <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" />

    <application
        android:theme="@style/Theme"
        android:supportsRtl="true"
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
        <option name="test-file-name" value="BinderDeathRecipientHelperApp2.apk" />
        <option name="test-file-name" value="BinderProxyCountingTestApp.apk" />
        <option name="test-file-name" value="BinderProxyCountingTestService.apk" />
        <option name="test-file-name" value="AppThatUsesAppOps.apk" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+30 −0
Original line number Diff line number Diff line
// Copyright (C) 2024 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.

package {
    default_team: "trendy_team_android_permissions",
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_test_helper_app {
    name: "AppThatUsesAppOps",

    srcs: ["src/**/*.kt"],

    static_libs: [
        "coretests-aidl",
        "truth",
        "junit",
    ],
}
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2024 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.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="android.app.appops.appthatusesappops">
    <attribution android:tag="testAttribution" android:label="@string/testAttributionLabel" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <application
            android:attributionsAreUserVisible="true">
        <service android:name=".AppOpsUserService" android:exported="true" />
    </application>
</manifest>
Loading