/platform_testing/utils/permissions/src/com/android/permissionutils/ |
D | GrantPermissionUtil.java | 36 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/ |
D | PerformanceBase.java | 42 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/health/runners/longevity/platform/src/android/platform/test/longevity/ |
D | ScheduledScenarioRunner.java | 206 Context context = InstrumentationRegistry.getContext(); in suspensionAwareSleep() local 207 AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in suspensionAwareSleep() 212 context.getPackageName(), Process.myPid(), Thread.currentThread().getId()); in suspensionAwareSleep() 219 public void onReceive(Context context, Intent intent) { in suspensionAwareSleep() 226 context.registerReceiver(receiver, wakeUpActionFilter); in suspensionAwareSleep() 229 context, in suspensionAwareSleep() 243 context.unregisterReceiver(receiver); in suspensionAwareSleep()
|
/platform_testing/libraries/collectors-helper/app/src/com/android/helpers/ |
D | AppVersionHelper.java | 40 private Context context; field in AppVersionHelper 46 context = ApplicationProvider.getApplicationContext().getApplicationContext(); in setUp() 47 packageManager = context.getPackageManager(); in setUp()
|
/platform_testing/libraries/flicker/src/com/android/server/wm/flicker/helpers/ |
D | WindowUtils.kt | 34 private val context in isRotated() constant 35 get() = InstrumentationRegistry.getInstrumentation().context in isRotated() 38 get() = context.getResources() in isRotated() 46 val wm = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager in isRotated() 56 val wm = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager in isRotated()
|
D | StandardAppHelper.kt | 57 get() = mInstrumentation.context.getSystemService(ActivityManager::class.java) 59 protected val context: Context constant 60 get() = mInstrumentation.context 140 context.startActivity(intent) in launchAppViaIntent()
|
D | SampleAppHelper.kt | 35 private val pkgManager: PackageManager = instrumentation.context.packageManager
|
/platform_testing/libraries/device-collectors/src/main/java/android/device/stressmodes/ |
D | LockContentionStressMode.java | 48 final Context context = InstrumentationRegistry.getInstrumentation().getContext(); in LockContentionStressMode() local 50 final PackageManager pm = context.getPackageManager(); in LockContentionStressMode() 53 final WindowManager wm = context.getSystemService(WindowManager.class); in LockContentionStressMode() 56 final ActivityManager am = context.getSystemService(ActivityManager.class); in LockContentionStressMode()
|
/platform_testing/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/helper/ |
D | SimpleGLSurfaceView.java | 32 public SimpleGLSurfaceView(Context context) { in SimpleGLSurfaceView() argument 33 super(context); in SimpleGLSurfaceView()
|
/platform_testing/tests/jank/uibench/src/com/android/uibench/janktests/ |
D | UiBenchJankTestsHelper.java | 60 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/collectors-helper/statsd/test/src/com/android/helpers/ |
D | HelperTestUtility.java | 109 Context context = InstrumentationRegistry.getContext(); in wakeUpAndUnlock() local 111 (DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE); in wakeUpAndUnlock() 115 (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); in wakeUpAndUnlock()
|
/platform_testing/libraries/media-helper/src/android/test/mediahelper/ |
D | MediaStoreHelper.java | 39 private MediaStoreHelper(Context context) { in MediaStoreHelper() argument 40 mContentResolver = context.getContentResolver(); in MediaStoreHelper() 43 public static MediaStoreHelper getInstance(Context context) { in getInstance() argument 45 sInstance = new MediaStoreHelper(context); in getInstance()
|
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/ |
D | CalculatorHelper.java | 46 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/libraries/health/runners/longevity/platform/src/android/platform/test/longevity/listener/ |
D | BatteryTerminator.java | 41 public BatteryTerminator(RunNotifier notifier, Map<String, String> args, Context context) { in BatteryTerminator() argument 44 mContext = context; in BatteryTerminator()
|
/platform_testing/libraries/automotive-helpers/notifications-app-helper/src/android/platform/helpers/ |
D | AutoNotificationMockingHelperImpl.java | 146 Context context = mInstrumentation.getContext(); in getBuilder() local 148 new Notification.Builder(context, NOTIFICATION_CHANNEL_ID) in getBuilder() 155 context, in getBuilder() 157 context.getPackageManager().getLaunchIntentForPackage(pkg), in getBuilder()
|
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/ |
D | UiBenchJankTestsHelper.java | 60 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/libraries/flicker/test/src/com/android/server/wm/flicker/ |
D | Utils.kt | 73 val context: Context = InstrumentationRegistry.getInstrumentation().context in readTestFile() constant 74 val inputStream = context.resources.assets.open("testdata/$relativePath") in readTestFile()
|
/platform_testing/libraries/car-helpers/multiuser-helper/src/android/platform/helpers/ |
D | MultiUserHelper.java | 50 Context context = InstrumentationRegistry.getTargetContext(); in MultiUserHelper() local 51 mUserManager = UserManager.get(context); in MultiUserHelper() 52 Car car = Car.createCar(context); in MultiUserHelper()
|
/platform_testing/libraries/flicker/src/com/android/server/wm/flicker/monitor/ |
D | ScreenRecorder.kt | 38 context: Context, 45 private val displayManager = context.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager 46 private val windowManager = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
/platform_testing/tests/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/ |
D | SettingsJankTests.java | 72 Context context = getInstrumentation().getContext(); in setUp() local 73 Intent intent = context.getPackageManager().getLaunchIntentForPackage(SETTINGS_PACKAGE); in setUp() 75 context.startActivity(intent); in setUp()
|
/platform_testing/libraries/telephony-utility/src/android/telephony/utility/ |
D | SimCardUtil.java | 80 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/ |
D | NotificationHelper.java | 252 public static PendingIntent getPendingIntent(Context context, String text) { in getPendingIntent() argument 253 Intent toastIntent = new Intent(context, ToastService.class); in getPendingIntent() 259 context, in getPendingIntent()
|
/platform_testing/libraries/app-helpers/core/src/android/platform/helpers/ |
D | HelperManager.java | 76 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/ |
D | DownloadAppTestHelper.java | 62 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/ |
D | NotificationHelper.java | 256 public void showAppNotificationSettings(Context context) throws Exception { in showAppNotificationSettings() argument 261 context.startActivity(intent); in showAppNotificationSettings() 342 public static PendingIntent getPendingIntent(Context context, String text) { in getPendingIntent() argument 343 Intent toastIntent = new Intent(context, ToastService.class); in getPendingIntent() 348 context, 58, toastIntent, in getPendingIntent()
|