/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8332/ |
D | poc.c | 106 applicationContext sContext; in main() local 115 sContext.blobSize = gNumStartValues + REPEATVALUES * gNumRepeatValues in main() 117 sContext.blob = (char*) opj_malloc(sContext.blobSize); in main() 118 if (!sContext.blob) { in main() 121 memset(sContext.blob, 0, sContext.blobSize); in main() 123 memcpy(&sContext.blob[offset], gStartValues, gNumStartValues); in main() 126 memcpy(&sContext.blob[offset], gRepeatValues, gNumRepeatValues); in main() 129 memcpy(&sContext.blob[offset], gLastValues, gNumLastValues); in main() 131 sContext.readPos = 0; in main() 133 private->m_user_data = (void*)&sContext; in main() [all …]
|
/cts/tests/camera/src/android/hardware/camera2/cts/rs/ |
D | RenderScriptSingleton.java | 34 private static Context sContext; field in RenderScriptSingleton 47 if (context.equals(sContext)) { in setContext() 49 } else if (sContext != null) { in setContext() 52 ", before clearing previous "+ sContext); in setContext() 58 sContext = context; in setContext() 69 if (sContext != null) { in clearContext() 75 sContext = null; in clearContext()
|
/cts/tests/tests/print/src/android/print/pdf/cts/ |
D | PrintedPdfDocumentTest.java | 44 private static Context sContext; field in PrintedPdfDocumentTest 48 sContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in setUp() 53 assertException(() -> new PrintedPdfDocument(sContext, null), NullPointerException.class); in createWithNullAttributes() 59 assertException(() -> new PrintedPdfDocument(sContext, attr), NullPointerException.class); in createWithNullMediaSize() 66 assertException(() -> new PrintedPdfDocument(sContext, attr), in createWithNullMargins() 85 PrintedPdfDocument doc = new PrintedPdfDocument(sContext, attr); in startPage() 96 PrintedPdfDocument doc = new PrintedPdfDocument(sContext, attr); in oneMilPageSize() 122 PrintedPdfDocument doc = new PrintedPdfDocument(sContext, attr); in getPageWidth() 132 PrintedPdfDocument doc = new PrintedPdfDocument(sContext, attr); in getPageHeight() 142 PrintedPdfDocument doc = new PrintedPdfDocument(sContext, attr); in getContentRect() [all …]
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | PermissionUpdateListenerTest.java | 52 private static final Context sContext = field in PermissionUpdateListenerTest 54 private static final PackageManager sPm = sContext.getPackageManager(); 95 sPm.revokeRuntimePermission(PACKAGE_NAME, PERMISSION_NAME, sContext.getUser()); in grantNotifiesListener() 97 sPm.grantRuntimePermission(PACKAGE_NAME, PERMISSION_NAME, sContext.getUser()); in grantNotifiesListener() 108 sPm.grantRuntimePermission(PACKAGE_NAME, PERMISSION_NAME, sContext.getUser()); in revokeNotifiesListener() 110 sPm.revokeRuntimePermission(PACKAGE_NAME, PERMISSION_NAME, sContext.getUser()); in revokeNotifiesListener() 124 sContext.getUser()); in updateFlagsNotifiesListener()
|
D | LocationAccessCheckTest.java | 121 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in LocationAccessCheckTest 123 (ActivityManager) sContext.getSystemService(Context.ACTIVITY_SERVICE); 127 private static final String PERMISSION_CONTROLLER_PKG = sContext.getPackageManager() 141 sContext.getPackageManager(), MainlineModule.PERMISSION_CONTROLLER)); in assumeNotPlayManaged() 330 runShellCommand("cmd notification allow_listener " + (new ComponentName(sContext, in allowNotificationAccess() 341 ContentResolver cr = sContext.getContentResolver(); in reduceDelays() 371 sContext.unbindService(sConnection); in unbindService() 413 sContext.bindService(testAppService, sConnection, BIND_AUTO_CREATE | BIND_NOT_FOREGROUND); in bindService() 453 sContext.getSystemService(LocationManager.class).requestSingleUpdate(crit, in assumeCanGetFineLocation() 504 for (ResolveInfo ri : sContext.getPackageManager().queryBroadcastReceivers( in resetPermissionController() [all …]
|
D | PermissionControllerTest.java | 92 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in PermissionControllerTest 94 sContext.getSystemService(PermissionControllerManager.class); 149 request, doDryRun, REASON_MALWARE, sContext.getMainExecutor())); in revokePermissions() 152 return revokePermissions(request, doDryRun, REASON_MALWARE, sContext.getMainExecutor()); in revokePermissions() 161 sContext.getSystemService(AppOpsManager.class).setUidMode(permissionToOp(perm), in setAppOp() 162 sContext.getPackageManager().getPackageUid(pkg, 0), mode); in setAppOp() 183 for (PermissionGroupInfo permGroup : sContext.getPackageManager().getAllPermissionGroups( in assertRuntimePermissionLabelsAreValid() 185 CharSequence permissionGroupLabel = permGroup.loadLabel(sContext.getPackageManager()); in assertRuntimePermissionLabelsAreValid() 232 assertThat(sContext.getPackageManager().checkPermission(ACCESS_BACKGROUND_LOCATION, in revokePermissionsSinglePermission() 294 false, REASON_INSTALLER_POLICY_VIOLATION, sContext.getMainExecutor())); in revokePermissionsPolicyViolationFromWrongPackage() [all …]
|
D | ActivityPermissionRationaleTest.java | 56 private static Context sContext = InstrumentationRegistry.getInstrumentation().getContext(); field in ActivityPermissionRationaleTest 81 sContext.startActivity(intent); in assertAppShowRationaleIs() 87 runShellCommand("pm clear --user " + sContext.getUserId() in clearData()
|
D | ShellPermissionTest.java | 53 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in ShellPermissionTest 65 final PackageManager pm = sContext.getPackageManager(); in testBlacklistedPermissions()
|
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/ |
D | PermissionUtils.java | 67 private static final Context sContext = field in PermissionUtils 86 return sContext.getSystemService(AppOpsManager.class).unsafeCheckOpRaw( in getAppOp() 88 sContext.getPackageManager().getPackageUid(packageName, 0), packageName); in getAppOp() 134 () -> sContext.getSystemService(AppOpsManager.class).setUidMode(op, in setAppOpByName() 135 sContext.getPackageManager().getPackageUid(packageName, 0), mode), in setAppOpByName() 151 return sContext.checkPermission(permission, Process.myPid(), in isPermissionGranted() 152 sContext.getPackageManager().getPackageUid(packageName, 0)) in isPermissionGranted() 267 () -> sContext.getPackageManager().getPermissionFlags(permission, packageName, in getPermissionFlags() 286 () -> sContext.getPackageManager().updatePermissionFlags(permission, packageName, in setPermissionFlags() 300 PackageInfo appInfo = sContext.getPackageManager().getPackageInfo(packageName, in getPermissions() [all …]
|
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/ |
D | OutOfProcessActivity.java | 19 import static android.contentcaptureservice.cts.Helper.sContext; 117 final Intent startIntent = new Intent(sContext, in startAndWaitOutOfProcessActivity() 119 getStartedMarker(sContext).delete(); in startAndWaitOutOfProcessActivity() 120 sContext.startActivity(startIntent); in startAndWaitOutOfProcessActivity() 122 return getStartedMarker(sContext).exists(); in startAndWaitOutOfProcessActivity() 124 getStartedMarker(sContext).delete(); in startAndWaitOutOfProcessActivity() 154 return getStoppedMarker(sContext).exists();
|
D | AbstractContentCaptureIntegrationTest.java | 21 import static android.contentcaptureservice.cts.Helper.sContext; 68 new DeviceConfigStateManager(sContext, DeviceConfig.NAMESPACE_CONTENT_CAPTURE, 78 sContext, DeviceConfig.NAMESPACE_CONTENT_CAPTURE, 126 sContext, CONTENT_CAPTURE_ENABLED, "1"); 164 sContext.getApplicationContext().setContentCaptureOptions(options); in whitelistSelf() 170 sContext.getApplicationContext().setContentCaptureOptions(null); in unWhitelistSelf() 213 SettingsUtils.syncSet(sContext, CONTENT_CAPTURE_ENABLED, enabled ? "1" : "0"); in setFeatureEnabledBySettings()
|
D | AbstractContentCaptureIntegrationAutoActivityLaunchTest.java | 19 import static android.contentcaptureservice.cts.Helper.sContext; 53 final Application app = (Application) sContext.getApplicationContext(); in registerLifecycleCallback() 62 final Application app = (Application) sContext.getApplicationContext(); in unregisterLifecycleCallback() 104 return new Intent(sContext, mActivityClass); in getLaunchIntent()
|
D | WhitelistTest.java | 23 import static android.contentcaptureservice.cts.Helper.sContext; 111 OutOfProcessActivity.startActivity(sContext, ACTION_CHECK_MANAGER_AND_FINISH); in launchActivityAndAssert() 112 final File startedMarker = OutOfProcessActivity.waitActivityStarted(sContext); in launchActivityAndAssert()
|
D | ClipboardAccessTest.java | 20 import static android.contentcaptureservice.cts.Helper.sContext; 39 mClipboardManager = (ClipboardManager) sContext.getSystemService(CLIPBOARD_SERVICE); in prepareClipboardManager()
|
D | CanaryTest.java | 21 import static android.contentcaptureservice.cts.Helper.sContext; 54 final String enableSettings = new DeviceConfigStateManager(sContext, in assertHasService()
|
/cts/tests/backup/src/android/backup/cts/ |
D | PermissionTest.java | 72 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in PermissionTest 360 () -> sContext.getPackageManager().updatePermissionFlags(permission, app, in setFlag() 361 flag, flag, sContext.getUser())); in setFlag() 366 () -> sContext.getPackageManager().updatePermissionFlags(permission, app, in clearFlag() 367 flag, 0, sContext.getUser())); in clearFlag() 373 () -> sContext.getPackageManager().getPermissionFlags(permission, app, in isFlagSet() 374 sContext.getUser())) & flag) == flag; in isFlagSet() 381 return sContext.getPackageManager().checkPermission(permission, app); in checkPermission() 386 () -> sContext.getSystemService(AppOpsManager.class).setUidMode( in setAppOp() 388 sContext.getPackageManager().getPackageUid(app, 0), mode)); in setAppOp() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | VisibilitySetterActionTest.java | 39 private static final Context sContext = getInstrumentation().getTargetContext(); field in VisibilitySetterActionTest 40 private final ViewGroup mRootView = new ViewGroup(sContext) { 67 final View view = new View(sContext); in testOneChild() 82 final View view = new View(sContext); in testOneChildAddedTwice() 97 final View view1 = new View(sContext); in testMultipleChildren() 102 final View view2 = new View(sContext); in testMultipleChildren()
|
D | UserDataTest.java | 49 private static final Context sContext = getInstrumentation().getTargetContext(); field in UserDataTest 53 new SettingsStateChangerRule(sContext, 58 new SettingsStateChangerRule(sContext, AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT, "2"); 62 new SettingsStateChangerRule(sContext, AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE, "4"); 66 new SettingsStateChangerRule(sContext, AUTOFILL_USER_DATA_MIN_VALUE_LENGTH, "4"); 70 new SettingsStateChangerRule(sContext, AUTOFILL_USER_DATA_MAX_VALUE_LENGTH, "50");
|
D | VirtualContainerActivityCompatModeTest.java | 60 sContext, NAMESPACE_GLOBAL, AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES, 69 sContext.getApplicationContext().setAutofillOptions(null); in resetCompatMode() 74 sContext.getApplicationContext() in preActivityCreated() 103 SettingsUtils.syncSet(sContext, NAMESPACE_GLOBAL, AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES, in testMultipleUrlBars_firstDoesNotExist() 128 SettingsUtils.syncSet(sContext, NAMESPACE_GLOBAL, AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES, in testMultipleUrlBars_bothExist()
|
D | AutoFillServiceTestCase.java | 203 protected static final Context sContext = getInstrumentation().getTargetContext(); 207 new SettingsStateKeeperRule(sContext, Settings.Secure.AUTOFILL_SERVICE) { 269 .around(new DeviceConfigStateChangerRule(sContext, DeviceConfig.NAMESPACE_AUTOFILL, 277 protected final Context mContext = sContext; 312 final String value = Settings.Global.getString(sContext.getContentResolver(), prop);
|
/cts/tests/tests/syncmanager/apps/app1/src/android/content/syncmanager/cts/app/ |
D | ContextHolder.java | 21 static volatile Context sContext; field in ContextHolder 24 return sContext; in getContext()
|
/cts/tests/tests/role/src/android/app/role/cts/ |
D | RoleManagerTest.java | 114 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in RoleManagerTest 115 private static final PackageManager sPackageManager = sContext.getPackageManager(); 116 private static final RoleManager sRoleManager = sContext.getSystemService(RoleManager.class); 165 sContext.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); in closeNotificationShade() 451 sContext.startActivity(new Intent() in targetSdk28AndChangeDefaultDialerAndAllowThenIsDefaultDialer() 471 sContext.startActivity(new Intent() in targetSdk28AndChangeDefaultSmsAndAllowThenIsDefaultSms() 480 Telephony.Sms.getDefaultSmsPackage(sContext), APP_28_PACKAGE_NAME)); in targetSdk28AndChangeDefaultSmsAndAllowThenIsDefaultSms() 520 sContext.startActivity(new Intent() in targetSdk28AndChangeDefaultDialerForAnotherAppAsHolderAndAllowThenTheOtherAppIsDefaultDialer() 543 sContext.startActivity(new Intent() in targetSdk28AndChangeDefaultSmsForAnotherAppAsHolderAndAllowThenTheOtherAppIsDefaultSms() 552 Telephony.Sms.getDefaultSmsPackage(sContext), APP_PACKAGE_NAME)); in targetSdk28AndChangeDefaultSmsForAnotherAppAsHolderAndAllowThenTheOtherAppIsDefaultSms() [all …]
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityManagerApi29Test.java | 89 private static final Context sContext = sInstrumentation.getContext(); field in ActivityManagerApi29Test 92 (AppOpsManager) sContext.getSystemService(AppOpsManager.class); 99 sUid = sContext.getPackageManager().getApplicationInfo(PACKAGE_NAME, 0).uid; 111 CtsAppTestUtils.turnScreenOn(sInstrumentation, sContext); in setUp() 118 mOldAppOpsSettings = Settings.Global.getString(sContext.getContentResolver(), in setUp() 120 Settings.Global.putString(sContext.getContentResolver(), in setUp() 139 Settings.Global.putString(sContext.getContentResolver(), in tearDown() 289 sAppOps.getHistoricalOps(histOpsRequest, sContext.getMainExecutor(), ops::complete); in testAppOpsHistoricalOps()
|
/cts/tests/tests/permission2/src/android/permission2/cts/ |
D | RestrictedStoragePermissionSharedUidTest.java | 75 private static @NonNull Context sContext = field in RestrictedStoragePermissionSharedUidTest.TestApp 78 sContext.getSystemService(AppOpsManager.class); 79 private static @NonNull PackageManager sPackageManager = sContext.getPackageManager(); 113 int uid = sContext.getPackageManager().getPackageUid(mPkg, 0); in assertHasNotIsolatedStorage()
|
D | PermissionPolicyTest.java | 89 private static final Context sContext = field in PermissionPolicyTest 95 getPermissionsForPackage(sContext, PLATFORM_PACKAGE_NAME); in platformPermissionPolicyIsUnaltered() 99 List<PermissionGroupInfo> declaredGroups = sContext.getPackageManager() in platformPermissionPolicyIsUnaltered() 111 if (sContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) { in platformPermissionPolicyIsUnaltered() 114 getPermissionsForPackage(sContext, AUTOMOTIVE_SERVICE_PACKAGE_NAME)); in platformPermissionPolicyIsUnaltered() 243 try (InputStream in = sContext.getResources().openRawResource(resourceId)) { in loadExpectedPermissions() 289 try (InputStream in = sContext.getResources().openRawResource(resourceId)) { in loadExpectedPermissionGroupNames()
|