Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 30) sorted by relevance

12

/platform_testing/utils/permissions/src/com/android/permissionutils/
DGrantPermissionUtil.java36 public static void grantAllPermissions (Context context) { in grantAllPermissions() argument
37 PackageManager pm = context.getPackageManager(); in grantAllPermissions()
38 for (PackageInfo pkgInfo : getPackageInfos(context)) { in grantAllPermissions()
39 List<String> missingPermissions = getMissingPermissions(context, pkgInfo); in grantAllPermissions()
48 public static void dumpMissingPermissions (Context context) { in dumpMissingPermissions() argument
49 for (PackageInfo pkgInfo : getPackageInfos(context)) { in dumpMissingPermissions()
50 List<String> missingPermissions = getMissingPermissions(context, pkgInfo); in dumpMissingPermissions()
60 private static List<PackageInfo> getPackageInfos(Context context) { in getPackageInfos() argument
61 return context.getPackageManager().getInstalledPackages(PackageManager.GET_PERMISSIONS); in getPackageInfos()
64 private static List<String> getMissingPermissions(Context context, PackageInfo info) { in getMissingPermissions() argument
[all …]
/platform_testing/tests/health/scenarios/src/android/platform/test/scenario/performancelaunch/hermeticapp/
DPerformanceBase.java42 Context context = InstrumentationRegistry.getContext(); in open() local
43 final Intent intent = context.getPackageManager().getLaunchIntentForPackage(PACKAGE); in open()
47 context.startActivity(intent); in open()
/platform_testing/libraries/flicker/test/src/com/android/server/wm/flicker/
DTestFileUtils.java26 Context context = InstrumentationRegistry.getContext(); in readTestFile() local
27 InputStream in = context.getResources().getAssets().open("testdata/" + relativePath); in readTestFile()
/platform_testing/libraries/health/runners/longevity/platform/src/android/platform/test/longevity/
DScheduledScenarioRunner.java224 Context context = InstrumentationRegistry.getContext(); in suspensionAwareSleep() local
225 AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in suspensionAwareSleep()
231 context.getPackageName(), in suspensionAwareSleep()
240 public void onReceive(Context context, Intent intent) { in suspensionAwareSleep()
247 context.registerReceiver(receiver, wakeUpActionFilter); in suspensionAwareSleep()
250 context, 0, new Intent(wakeUpAction), PendingIntent.FLAG_UPDATE_CURRENT); in suspensionAwareSleep()
261 context.unregisterReceiver(receiver); in suspensionAwareSleep()
DLongevitySuite.java113 Instrumentation instrumentation, Context context, Bundle arguments) in LongevitySuite() argument
118 mContext = context; in LongevitySuite()
/platform_testing/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/helper/
DSimpleGLSurfaceView.java32 public SimpleGLSurfaceView(Context context) { in SimpleGLSurfaceView() argument
33 super(context); in SimpleGLSurfaceView()
/platform_testing/libraries/collectors-helper/statsd/test/src/com/android/helpers/
DHelperTestUtility.java107 Context context = InstrumentationRegistry.getContext(); in wakeUpAndUnlock() local
109 (DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE); in wakeUpAndUnlock()
113 (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); in wakeUpAndUnlock()
/platform_testing/tests/jank/uibench/src/com/android/uibench/janktests/
DUiBenchJankTestsHelper.java60 private UiBenchJankTestsHelper(Context context, UiDevice device) { in UiBenchJankTestsHelper() argument
61 mContext = context; in UiBenchJankTestsHelper()
63 mDisplayMetrics = context.getResources().getDisplayMetrics(); in UiBenchJankTestsHelper()
66 public static UiBenchJankTestsHelper getInstance(Context context, UiDevice device) { in getInstance() argument
68 sInstance = new UiBenchJankTestsHelper(context, device); in getInstance()
/platform_testing/libraries/health/runners/longevity/platform/src/android/platform/test/longevity/listener/
DBatteryTerminator.java41 public BatteryTerminator(RunNotifier notifier, Map<String, String> args, Context context) { in BatteryTerminator() argument
44 mContext = context; in BatteryTerminator()
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/
DCalculatorHelper.java46 private CalculatorHelper(UiDevice device, Context context) { in CalculatorHelper() argument
48 mContext = context; in CalculatorHelper()
52 public static CalculatorHelper getInstance(UiDevice device, Context context) { in getInstance() argument
54 mInstance = new CalculatorHelper(device, context); in getInstance()
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/
DUiBenchJankTestsHelper.java60 private UiBenchJankTestsHelper(UiDevice device, Context context) { in UiBenchJankTestsHelper() argument
62 mContext = context; in UiBenchJankTestsHelper()
69 public static UiBenchJankTestsHelper getInstance(UiDevice device, Context context) { in getInstance() argument
71 mInstance = new UiBenchJankTestsHelper(device, context); in getInstance()
/platform_testing/tests/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/
DSettingsJankTests.java72 Context context = getInstrumentation().getContext(); in setUp() local
73 Intent intent = context.getPackageManager().getLaunchIntentForPackage(SETTINGS_PACKAGE); in setUp()
75 context.startActivity(intent); in setUp()
DSystemUiJankTests.java219 Context context = getInstrumentation().getContext(); in postNotifications() local
240 context, 0, new Intent(context, DummyActivity.class), 0)); in postNotifications()
248 Context context = getInstrumentation().getContext(); in createSmartSuggestionsNotificationBuilder() local
249 Builder builder = new Builder(context) in createSmartSuggestionsNotificationBuilder()
273 Context context = getInstrumentation().getContext(); in createSmartAction() local
274 PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0 , new Intent(), in createSmartAction()
276 Icon icon = Icon.createWithResource(context, ICONS[0]); in createSmartAction()
286 Context context = getInstrumentation().getTargetContext(); in postInlineReplyNotification() local
287 PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0 , new Intent(), in postInlineReplyNotification()
289 Icon icon = Icon.createWithResource(context, ICONS[0]); in postInlineReplyNotification()
/platform_testing/libraries/aoa-helper/src/com/android/helper/aoa/
DUsbHelper.java63 PointerByReference context = new PointerByReference(); in UsbHelper() local
64 checkResult(mUsb.libusb_init(context)); in UsbHelper()
65 mContext = context.getValue(); in UsbHelper()
DIUsbNative.java31 int libusb_init(PointerByReference context); in libusb_init() argument
/platform_testing/libraries/telephony-utility/src/android/telephony/utility/
DSimCardUtil.java80 Context context = InstrumentationRegistry.getTargetContext(); in getSimCardInformation() local
83 … TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in getSimCardInformation()
/platform_testing/libraries/system-helpers/sysui-helper/src/android/system/helpers/
DNotificationHelper.java251 public static PendingIntent getPendingIntent(Context context, String text) { in getPendingIntent() argument
252 Intent toastIntent = new Intent(context, ToastService.class); in getPendingIntent()
257 context, 58, toastIntent, PendingIntent.FLAG_UPDATE_CURRENT); in getPendingIntent()
/platform_testing/libraries/app-helpers/core/src/android/platform/helpers/
DHelperManager.java76 public static HelperManager getInstance(Context context, Instrumentation instr) { in getInstance() argument
79 if (context == null) { in getInstance()
87 List<String> paths = Arrays.asList(context.getPackageCodePath()); in getInstance()
/platform_testing/tests/functional/downloadapp/src/com/android/functional/downloadapp/
DDownloadAppTestHelper.java62 private DownloadAppTestHelper(UiDevice device, Context context) { in DownloadAppTestHelper() argument
64 mContext = context; in DownloadAppTestHelper()
68 public static DownloadAppTestHelper getInstance(UiDevice device, Context context) { in getInstance() argument
70 mInstance = new DownloadAppTestHelper(device, context); in getInstance()
/platform_testing/tests/functional/notificationtests/src/com/android/notification/functional/
DNotificationHelper.java254 public void showAppNotificationSettings(Context context) throws Exception { in showAppNotificationSettings() argument
259 context.startActivity(intent); in showAppNotificationSettings()
340 public static PendingIntent getPendingIntent(Context context, String text) { in getPendingIntent() argument
341 Intent toastIntent = new Intent(context, ToastService.class); in getPendingIntent()
346 context, 58, toastIntent, PendingIntent.FLAG_UPDATE_CURRENT); in getPendingIntent()
DNotificationInteractionTests.java322 Context context = getInstrumentation().getContext(); in testNotificationClickedEvents() local
324 (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in testNotificationClickedEvents()
332 new Notification.Builder(context, CHANNEL_ID) in testNotificationClickedEvents()
336 PendingIntent pi = PendingIntent.getActivity(context, 1, in testNotificationClickedEvents()
/platform_testing/libraries/aoa-helper/tests/src/com/android/helper/aoa/
DUsbHelperTest.java67 PointerByReference context = in setUp()
69 context.setValue(pointer); in setUp()
/platform_testing/tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/
DUiBenchJankHelper.java144 Context context = mInstrumentation.getContext(); in slowSingleFlingDown() local
145 DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); in slowSingleFlingDown()
/platform_testing/libraries/flicker/src/com/android/server/wm/flicker/helpers/
DAutomationUtils.java279 public static void stopPackage(Context context, String packageName) { in stopPackage() argument
283 packageUid = context.getPackageManager().getPackageUid(packageName, /* flags= */ 0); in stopPackage()
/platform_testing/tests/perf/BootHelperApp/src/com/android/boothelper/
DBootHelperTest.java92 public void onReceive(Context context, Intent intent) { in unlockScreenWithPin()

12