Home
last modified time | relevance | path

Searched refs:SystemUtil (Results 1 – 25 of 285) sorted by relevance

12345678910>>...12

/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DAmUtils.java30 SystemUtil.runShellCommandForNoOutput("am make-uid-idle " + packageName); in runMakeUidIdle()
39 SystemUtil.runShellCommandForNoOutput("am kill --user cur " + packageName); in runKill()
50 final String output = SystemUtil.runShellCommand("ps -A -o NAME"); in isProcessRunning()
62 SystemUtil.runShellCommandForNoOutput("am set-standby-bucket " + packageName in setStandbyBucket()
71 final String value = SystemUtil.runShellCommand("am get-standby-bucket " + packageName); in getStandbyBucket()
81 SystemUtil.runCommandAndPrintOnLogcat(TAG, "am wait-for-broadcast-idle"); in waitForBroadcastIdle()
DBatteryUtils.java55 SystemUtil.runShellCommandForNoOutput("cmd battery unplug"); in runDumpsysBatteryUnplug()
66 SystemUtil.runShellCommandForNoOutput(("cmd battery set level " + level)); in runDumpsysBatterySetLevel()
75 SystemUtil.runShellCommandForNoOutput(("cmd battery set ac " + (pluggedIn ? "1" : "0"))); in runDumpsysBatterySetPluggedIn()
101 SystemUtil.runShellCommandForNoOutput(("cmd battery reset")); in runDumpsysBatteryReset()
108 SystemUtil.runShellCommandForNoOutput( in enableAdaptiveBatterySaver()
118 SystemUtil.runShellCommandForNoOutput("cmd power set-mode 1"); in enableBatterySaver()
122 SystemUtil.runShellCommandForNoOutput("cmd power set-mode 0"); in enableBatterySaver()
137 SystemUtil.runShellCommandForNoOutput("input keyevent KEYCODE_WAKEUP"); in turnOnScreen()
141 SystemUtil.runShellCommandForNoOutput("input keyevent KEYCODE_SLEEP"); in turnOnScreen()
DDeviceConfigStateHelper.java49 final String ogValue = SystemUtil.runWithShellPermissionIdentity( in maybeCacheOriginalValueLocked()
59 SystemUtil.runWithShellPermissionIdentity( in set()
70 SystemUtil.runWithShellPermissionIdentity( in set()
83 SystemUtil.runWithShellPermissionIdentity( in restoreOriginalValues()
DAppStandbyUtils.java35 final String result = SystemUtil.runShellCommand( in isAppStandbyEnabled()
63 SystemUtil.runShellCommand("settings get global app_standby_enabled").trim(); in isAppStandbyEnabledAtRuntime()
72 return SystemUtil.callWithShellPermissionIdentity( in getAppStandbyBucket()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DServiceProcessController.java32 import com.android.compatibility.common.util.SystemUtil;
113 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyBackgroundOp()
123 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowBackgroundOp()
130 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyAnyInBackgroundOp()
136 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowAnyInBackgroundOp()
141 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle()
146 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromWhitelist()
151 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in addToWhitelist()
157 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in tempWhitelist()
163 SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromTempWhitelist()
[all …]
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DBatteryConstraintTest.java29 import com.android.compatibility.common.util.SystemUtil;
63 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery on"); in setUp()
70 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown()
71 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
97 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set ac 1"); in setBatteryState()
99 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery unplug"); in setBatteryState()
101 int seq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
110 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
112 curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
124 boolean curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in verifyChargingState()
[all …]
DBaseJobSchedulerTest.java40 import com.android.compatibility.common.util.SystemUtil;
96 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
121 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
124 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
127 SystemUtil.runShellCommand(getInstrumentation(), in tearDown()
168 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
171 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
180 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
191 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState()
222 SystemUtil.runShellCommand(getInstrumentation(), in runSatisfiedJob()
/cts/tests/filesystem/src/android/filesystem/cts/
DAlmostFullTest.java27 import com.android.compatibility.common.util.SystemUtil;
65 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in setUp()
88 Log.i(TAG, "free disk " + SystemUtil.getFreeDiskSize(getContext())); in setUp()
93 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown()
102 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown()
110 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in testSequentialUpdate()
129 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in testRandomRead()
144 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in testRandomUpdate()
/cts/tests/tests/permission/src/android/permission/cts/
DStorageEscalationTest.kt30 import com.android.compatibility.common.util.SystemUtil in <lambda>()
59 SystemUtil.runShellCommand("pm uninstall $APP_PACKAGE_NAME --user ALL") in <lambda>()
67 val result = SystemUtil.runShellCommand("pm install -r$userString $apk") in <lambda>()
73 val createUserOutput: String = SystemUtil.runShellCommand("pm create-user secondary") in <lambda>()
82 SystemUtil.runShellCommand("am start-user -w $userId") in <lambda>()
89 SystemUtil.runShellCommand("pm remove-user $userId") in <lambda>()
108 SystemUtil.runWithShellPermissionIdentity { in <lambda>()
DUndefinedGroupPermissionTest.kt31 import com.android.compatibility.common.util.SystemUtil
32 import com.android.compatibility.common.util.SystemUtil.eventually
54 SystemUtil.runShellCommand("pm install -r " + in install()
82 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP") in wakeUpScreenAndUnlock()
83 SystemUtil.runShellCommand("input keyevent KEYCODE_MENU") in wakeUpScreenAndUnlock()
129 SystemUtil.runShellCommand("pm uninstall $APP_PKG_NAME") in uninstall()
148 SystemUtil.runWithShellPermissionIdentity { in testOtherGroupPermissionsNotGranted()
DNearbyDevicesRenouncePermissionTest.java24 import static com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow;
53 import com.android.compatibility.common.util.SystemUtil;
156 SystemUtil.eventually(() -> { in scanWithoutRenouncingNotesBluetoothAndLocation()
167 SystemUtil.eventually(() -> { in scanRenouncingLocationNotesBluetoothButNotLocation()
178 SystemUtil.eventually(() -> { in scanRenouncingInMiddleOfChainNotesBluetoothButNotLocation()
189 SystemUtil.eventually(() -> { in scanRenouncingAtEndOfChainNotesBluetoothButNotLocation()
243 return SystemUtil.callWithShellPermissionIdentity(() -> in createContext()
253 return SystemUtil.callWithShellPermissionIdentity(() -> in createContext()
264 return SystemUtil.callWithShellPermissionIdentity(() -> in createContext()
DOneTimePermissionTest.java25 import static com.android.compatibility.common.util.SystemUtil.eventually;
26 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
27 import static com.android.compatibility.common.util.SystemUtil.runWithShellPermissionIdentity;
40 import com.android.compatibility.common.util.SystemUtil;
81 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen()
83 SystemUtil.runShellCommand("input keyevent 82"); in wakeUpScreen()
163 SystemUtil.runWithShellPermissionIdentity(() -> in testPermissionRevokedOnKill()
/cts/tests/app/src/android/app/cts/
DApplicationTest.java33 import com.android.compatibility.common.util.SystemUtil;
45 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in tearDown()
78 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale()
80 SystemUtil.runShellCommand(getInstrumentation(), PUT_FONT_SCALE_CMD); in toggleFontScale()
82 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale()
DActivityManagerTest.java82 import com.android.compatibility.common.util.SystemUtil;
520 String[] configs = SystemUtil.runShellCommand(
779 SystemUtil.runWithShellPermissionIdentity( in testForceStopPackageWontRestartProcess()
806 List<RunningAppProcessInfo> runningApps = SystemUtil.callWithShellPermissionIdentity( in testForceStopPackageWontRestartProcess()
811 runningApps = SystemUtil.callWithShellPermissionIdentity(() -> { in testForceStopPackageWontRestartProcess()
858 SystemUtil.runWithShellPermissionIdentity(() -> { in testAppNotResponding()
909 SystemUtil.runWithShellPermissionIdentity(() -> { in testKillingPidsOnImperceptible()
914 SystemUtil.runWithShellPermissionIdentity(() -> { in testKillingPidsOnImperceptible()
961 SystemUtil.runWithShellPermissionIdentity(() -> { in testKillingPidsOnImperceptible()
990 SystemUtil.runShellCommand(mInstrumentation, in testKillingAppChildProcess()
[all …]
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/
DConstraintTest.java35 import com.android.compatibility.common.util.SystemUtil;
94 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
117 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
163 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
166 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
175 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
186 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState()
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DContactsContract_SimContactTest.java32 import com.android.compatibility.common.util.SystemUtil;
73 SystemUtil.runWithShellPermissionIdentity(() -> { in tearDown()
85 SystemUtil.runWithShellPermissionIdentity(() -> { in testAddSimAccount_returnedByGetSimAccounts()
118 SystemUtil.runWithShellPermissionIdentity(() -> { in testAddSimAccount_broadcastsChange()
134 SystemUtil.runWithShellPermissionIdentity(() -> { in testRemoveSimAccount_broadcastsChange()
141 SystemUtil.runWithShellPermissionIdentity(() -> { in testRemoveSimAccount_broadcastsChange()
/cts/tests/tests/sensorprivacy/src/android/sensorprivacy/cts/
DSensorPrivacyMicrophoneTest.kt24 import com.android.compatibility.common.util.SystemUtil
39 SystemUtil.runWithShellPermissionIdentity { in testMicShownOnPhoneCall()
47 SystemUtil.runWithShellPermissionIdentity { in testMicShownOnPhoneCall()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DTestUtils.java19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
20 import static com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow;
21 import static com.android.compatibility.common.util.SystemUtil.runWithShellPermissionIdentity;
35 import com.android.compatibility.common.util.SystemUtil;
168 SystemUtil.runWithShellPermissionIdentity( in unlockScreen()
/cts/tests/tests/print/src/android/print/cts/
DInstallBehavior.java27 import com.android.compatibility.common.util.SystemUtil;
51 SystemUtil.runShellCommand(getInstrumentation(), in uninstallExternalPrintService()
84 SystemUtil.runShellCommand(getInstrumentation(), in installedServiceIsEnabled()
/cts/tests/tests/content/lib/accountaccess/src/com.android.cts.content/
DUtils.java24 import com.android.compatibility.common.util.SystemUtil;
70 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in allowSyncAdapterRunInBackgroundAndDataInBackground()
73 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in allowSyncAdapterRunInBackgroundAndDataInBackground()
79 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in disallowSyncAdapterRunInBackgroundAndDataInBackground()
82 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in disallowSyncAdapterRunInBackgroundAndDataInBackground()
/cts/tests/AlarmManager/util/src/android/alarmmanager/util/
DAlarmManagerDeviceConfigHelper.java25 import com.android.compatibility.common.util.SystemUtil;
44 initialProperties = SystemUtil.callWithShellPermissionIdentity( in AlarmManagerDeviceConfigHelper()
83 final String output = SystemUtil.runShellCommand("cmd alarm get-config-version").trim(); in getCurrentConfigVersion()
89 SystemUtil.runWithShellPermissionIdentity( in commitAndAwaitPropagation()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DDreamManagerServiceTests.java42 import com.android.compatibility.common.util.SystemUtil;
75 SystemUtil.runWithShellPermissionIdentity(() -> { in setup()
84 SystemUtil.runWithShellPermissionIdentity(() -> { in reset()
92 SystemUtil.runWithShellPermissionIdentity(() -> { in startDream()
99 SystemUtil.runWithShellPermissionIdentity(() -> { in stopDream()
106 SystemUtil.runWithShellPermissionIdentity(() -> { in setActiveDream()
114 return SystemUtil.runWithShellPermissionIdentity(() -> { in getIsDreaming()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DExactAlarmsTest.java56 import com.android.compatibility.common.util.SystemUtil;
151 SystemUtil.runShellCommandForNoOutput("dumpsys battery reset"); in putDeviceToIdle()
152 SystemUtil.runShellCommand("cmd deviceidle force-idle deep"); in putDeviceToIdle()
158 SystemUtil.runShellCommand("am compat enable --no-kill REQUIRE_EXACT_ALARM_PERMISSION " in enableChange()
166 SystemUtil.runShellCommand("am compat reset --no-kill REQUIRE_EXACT_ALARM_PERMISSION " in resetChanges()
176 SystemUtil.runWithShellPermissionIdentity( in removeFromWhitelists()
178 SystemUtil.runShellCommand("cmd deviceidle tempwhitelist -r " + packageName); in removeFromWhitelists()
183 SystemUtil.runShellCommand("cmd deviceidle unforce"); in restoreBatteryState()
184 SystemUtil.runShellCommandForNoOutput("dumpsys battery reset"); in restoreBatteryState()
189 SystemUtil.runWithShellPermissionIdentity( in restorePermissionReceiverState()
[all …]
DTimeChangeTests.java41 import com.android.compatibility.common.util.SystemUtil;
91 SystemUtil.runWithShellPermissionIdentity(() -> mAlarmManager.setTime(rtcToSet)); in setTime()
96 String auto_time = SystemUtil.runShellCommand("settings get global auto_time"); in isAutoTimeEnabled()
114 SystemUtil.runShellCommand("settings put global auto_time 0"); in setUp()
156 SystemUtil.runShellCommand("settings put global auto_time 1"); in tearDown()
/cts/libs/install/src/com/android/cts/install/lib/
DInstall.java24 import com.android.compatibility.common.util.SystemUtil;
222 SystemUtil.runShellCommandForNoOutput("pm bypass-staged-installer-check true"); in createEmptyInstallSession()
225 SystemUtil.runShellCommandForNoOutput("pm bypass-allowed-apex-update-check true"); in createEmptyInstallSession()
247 SystemUtil.runShellCommandForNoOutput("pm bypass-staged-installer-check false"); in createEmptyInstallSession()
250 SystemUtil.runShellCommandForNoOutput("pm bypass-allowed-apex-update-check false"); in createEmptyInstallSession()

12345678910>>...12