Home
last modified time | relevance | path

Searched refs:AppOpsUtils (Results 1 – 25 of 29) sorted by relevance

12

/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DExternalSourcesTestAppOpAllowed.kt27 import com.android.compatibility.common.util.AppOpsUtils
66 assertTrue("Operation not logged", AppOpsUtils.allowedOperationLogged( in allowedSourceTest()
74 assertThat(AppOpsUtils.getOpMode(packageName, APP_OP_STR)) in verifyAppOpAllowed()
DSessionTest.kt42 import com.android.compatibility.common.util.AppOpsUtils
104 assertTrue(AppOpsUtils.allowedOperationLogged(context.packageName, APP_OP_STR)) in confirmInstallation()
128 assertTrue(AppOpsUtils.allowedOperationLogged(context.packageName, APP_OP_STR)) in confirmMultiPackageInstallation()
DInstallConstraintsTest.kt33 import com.android.compatibility.common.util.AppOpsUtils in <lambda>()
120 AppOpsUtils.setOpMode(TestApp.A, OPSTR_TAKE_AUDIO_FOCUS, MODE_ALLOWED) in <lambda>()
133 AppOpsUtils.reset(TestApp.A) in <lambda>()
/cts/tests/tests/packageinstaller/install_appop_default/src/android/packageinstaller/install_appop_default/cts/
DExternalSourcesTestAppOpDefault.kt27 import com.android.compatibility.common.util.AppOpsUtils
60 assertThat(AppOpsUtils.getOpMode(packageName, APP_OP_STR)) in verifyAppOpDefault()
71 assertTrue("Operation not logged", AppOpsUtils.rejectedOperationLogged(packageName, in defaultSourceTest()
/cts/tests/tests/packageinstaller/install_appop_denied/src/android/packageinstaller/install_appop_denied/cts/
DExternalSourcesTestAppOpDenied.kt27 import com.android.compatibility.common.util.AppOpsUtils
59 assertThat(AppOpsUtils.getOpMode(packageName, APP_OP_STR)) in verifyAppOpDenied()
70 assertTrue("Operation not logged", AppOpsUtils.rejectedOperationLogged(packageName, in blockedSourceTest()
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/
DAlertWindowsTests.java42 import com.android.compatibility.common.util.AppOpsUtils;
166 assertTrue(AppOpsUtils.rejectedOperationLogged(packageName, in assertAlertWindows()
212 assertTrue(AppOpsUtils.allowedOperationLogged(packageName, OPSTR_SYSTEM_ALERT_WINDOW)); in assertAlertWindows()
219 AppOpsUtils.reset(activityName.getPackageName()); in resetPermissionState()
225 AppOpsUtils.setOpMode(activityName.getPackageName(), OPSTR_SYSTEM_ALERT_WINDOW, mode); in setAlertWindowPermission()
DAlertWindowsAppOpsTests.java46 import com.android.compatibility.common.util.AppOpsUtils;
79 sPreviousSawAppOp = AppOpsUtils.getOpMode(packageName, OPSTR_SYSTEM_ALERT_WINDOW); in grantSystemAlertWindowAccess()
80 AppOpsUtils.setOpMode(packageName, OPSTR_SYSTEM_ALERT_WINDOW, MODE_ALLOWED); in grantSystemAlertWindowAccess()
85 AppOpsUtils.setOpMode(getInstrumentation().getContext().getPackageName(), in revokeSystemAlertWindowAccess()
DAlertWindowsImportanceTests.java52 import com.android.compatibility.common.util.AppOpsUtils;
175 AppOpsUtils.setOpMode(mServicePackageName, OPSTR_SYSTEM_ALERT_WINDOW, mode); in setAlertWindowPermission()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityLoggingTest.java27 import com.android.compatibility.common.util.AppOpsUtils;
54 AppOpsUtils.allowedOperationLogged(packageName, OPSTR_BIND_ACCESSIBILITY_SERVICE)); in testServiceLogged()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DExpeditedJobTest.java37 import com.android.compatibility.common.util.AppOpsUtils;
65 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, APP_OP_GET_USAGE_STATS, in setUp()
74 AppOpsUtils.reset(TEST_APP_PACKAGE); in tearDown()
DJobSchedulingTest.java47 import com.android.compatibility.common.util.AppOpsUtils;
71 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_DEFAULT); in tearDown()
157 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_DEFAULT); in testCanRunUserInitiatedJobs()
162 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_ERRORED); in testCanRunUserInitiatedJobs()
165 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_ALLOWED); in testCanRunUserInitiatedJobs()
168 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_IGNORED); in testCanRunUserInitiatedJobs()
626 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_DEFAULT);
629 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_ERRORED);
641 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_ALLOWED);
644 AppOpsUtils.setOpMode(MY_PACKAGE, OPSTR_RUN_USER_INITIATED_JOBS, MODE_IGNORED);
DTestAppInterface.java60 import com.android.compatibility.common.util.AppOpsUtils;
137 AppOpsUtils.reset(TEST_APP_PACKAGE); in cleanup()
223 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, in postFgsStartingAlarm()
286 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, "RUN_ANY_IN_BACKGROUND", in setTestPackageRestricted()
DJobThrottlingTest.java53 import com.android.compatibility.common.util.AppOpsUtils;
1321 AppOpsUtils.reset(TEST_APP_PACKAGE); in tearDown()
1353 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, "RUN_ANY_IN_BACKGROUND", in setTestPackageRestricted()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DBackgroundRestrictedAlarmsTest.java48 import com.android.compatibility.common.util.AppOpsUtils;
117 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, OPSTR_RUN_ANY_IN_BACKGROUND, MODE_IGNORED); in setUp()
158 AppOpsUtils.setOpMode(TEST_APP_PACKAGE, OPSTR_RUN_ANY_IN_BACKGROUND, MODE_ALLOWED); in testRepeatingAlarmBlocked()
193 AppOpsUtils.setUidMode(Utils.getPackageUid(TEST_APP_PACKAGE), OPSTR_SCHEDULE_EXACT_ALARM, in testAlarmClockNotBlocked()
210 AppOpsUtils.reset(TEST_APP_PACKAGE); in tearDown()
DExactAlarmsTest.java56 import com.android.compatibility.common.util.AppOpsUtils;
191 AppOpsUtils.reset(TEST_APP_PACKAGE); in resetAppOps()
192 AppOpsUtils.reset(TEST_APP_30); in resetAppOps()
206 AppOpsUtils.setUidMode(uid, AppOpsManager.OPSTR_SCHEDULE_EXACT_ALARM, mode); in setAppOp()
DAppStandbyTests.java47 import com.android.compatibility.common.util.AppOpsUtils;
142 AppOpsUtils.setUidMode(Utils.getPackageUid(TEST_APP_PACKAGE), OPSTR_SCHEDULE_EXACT_ALARM, in setUp()
/cts/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/
DUninstallTest.java64 import com.android.compatibility.common.util.AppOpsUtils;
114 AppOpsUtils.reset(mContext.getPackageName()); in setup()
170 AppOpsUtils.setOpMode(mContext.getPackageName(), "SYSTEM_ALERT_WINDOW", MODE_ALLOWED); in overlaysAreSuppressedWhenConfirmingUninstall()
243 assertTrue(AppOpsUtils.allowedOperationLogged(mContext.getPackageName(), APP_OP_STR)); in testUninstall()
DUninstallPinnedTest.java44 import com.android.compatibility.common.util.AppOpsUtils;
84 AppOpsUtils.reset(mContext.getPackageName()); in setup()
DArchiveTest.java69 import com.android.compatibility.common.util.AppOpsUtils;
140 AppOpsUtils.reset(mContext.getPackageName()); in setup()
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/
DBackgroundActivityTestBase.java48 import com.android.compatibility.common.util.AppOpsUtils;
130 AppOpsUtils.setOpMode(components.APP_PACKAGE_NAME, "android:system_alert_window", in setUp()
132 assertEquals(AppOpsUtils.getOpMode(components.APP_PACKAGE_NAME, in setUp()
162 AppOpsUtils.reset(app.APP_PACKAGE_NAME); in tearDown()
165 AppOpsUtils.reset(SHELL_PACKAGE); in tearDown()
DBackgroundActivityLaunchTest.java82 import com.android.compatibility.common.util.AppOpsUtils;
1383 AppOpsUtils.setOpMode(packageName, opStr, mode); in grantSystemAlertWindow()
1384 assertThat(AppOpsUtils.getOpMode(packageName, opStr)).isEqualTo(mode); in grantSystemAlertWindow()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DAppOpsUtils.java33 public final class AppOpsUtils { class
/cts/tests/framework/base/windowmanager/src/android/server/wm/input/
DWindowUntrustedTouchTest.java89 import com.android.compatibility.common.util.AppOpsUtils;
199 mPreviousSawAppOp = AppOpsUtils.getOpMode(APP_SELF, OPSTR_SYSTEM_ALERT_WINDOW); in setUp()
200 AppOpsUtils.setOpMode(APP_SELF, OPSTR_SYSTEM_ALERT_WINDOW, MODE_ALLOWED); in setUp()
224 AppOpsUtils.setOpMode(APP_SELF, OPSTR_SYSTEM_ALERT_WINDOW, mPreviousSawAppOp); in tearDown()
/cts/tests/tests/packageinstaller/criticaluserjourney/src/android/packageinstaller/criticaluserjourney/cts/
DPackageInstallerCujTestBase.java60 import com.android.compatibility.common.util.AppOpsUtils;
224 AppOpsUtils.setOpMode(TEST_INSTALLER_PACKAGE_NAME, OPSTR_REQUEST_INSTALL_PACKAGES, in grantRequestInstallPackagesPermission()
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DAudioPlaybackConfigurationTest.java39 import static com.android.compatibility.common.util.AppOpsUtils.getOpMode;
40 import static com.android.compatibility.common.util.AppOpsUtils.setOpMode;

12