/cts/tests/tests/shortcutmanager/throttling/src/android/content/pm/cts/shortcutmanager/throttling/ |
D | ShortcutManagerThrottlingTestReceiver.java | 42 public ShortcutManager getManager(Context context) { in getManager() argument 44 mManager = context.getSystemService(ShortcutManager.class); in getManager() 50 public void onReceive(Context context, Intent intent) { in onReceive() argument 56 testSetDynamicShortcuts(context, replyAction); in onReceive() 59 testAddDynamicShortcuts(context, replyAction); in onReceive() 62 testUpdateShortcuts(context, replyAction); in onReceive() 66 testBgServiceThrottled(context, replyAction); in onReceive() 70 testActivityUnthrottled(context, replyAction); in onReceive() 73 testFgServiceUnthrottled(context, replyAction); in onReceive() 77 testInlineReplyShow(context, replyAction); in onReceive() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/ |
D | ServReqTestSuite.java | 27 public static ArrayList<ReqTestCase> getTestSuite(Context context) { in getTestSuite() argument 28 initialize(context); in getTestSuite() 32 public static ReqTestCase getTestCase(Context context, in getTestCase() argument 34 initialize(context); in getTestCase() 44 private static void initialize(Context context) { in initialize() argument 50 sTestSuite.add(new ServReqAllTestCase01(context)); in initialize() 51 sTestSuite.add(new ServReqAllTestCase02(context)); in initialize() 52 sTestSuite.add(new ServReqAllTestCase03(context)); in initialize() 53 sTestSuite.add(new ServReqDnsPtrTestCase(context)); in initialize() 54 sTestSuite.add(new ServReqDnsTxtTestCase(context)); in initialize() [all …]
|
D | P2pClientTestSuite.java | 35 public static ArrayList<ReqTestCase> getTestSuite(Context context) { in getTestSuite() argument 36 initialize(context); in getTestSuite() 46 public static ReqTestCase getTestCase(Context context, in getTestCase() argument 48 initialize(context); in getTestCase() 58 private static void initialize(Context context) { in initialize() argument 64 sTestSuite.add(new P2pClientPbcTestCase(context)); in initialize() 65 sTestSuite.add(new P2pClientPinTestCase(context)); in initialize()
|
/cts/tests/tests/text/src/android/text/format/cts/ |
D | FormatterTest.java | 48 final Context context = in testFormatFileSize() local 52 assertEquals("0 B", Formatter.formatFileSize(context, 0)); in testFormatFileSize() 53 assertEquals("1 B", Formatter.formatFileSize(context, 1)); in testFormatFileSize() 54 assertEquals("9 B", Formatter.formatFileSize(context, 9)); in testFormatFileSize() 55 assertEquals("10 B", Formatter.formatFileSize(context, 10)); in testFormatFileSize() 56 assertEquals("99 B", Formatter.formatFileSize(context, 99)); in testFormatFileSize() 57 assertEquals("100 B", Formatter.formatFileSize(context, 100)); in testFormatFileSize() 58 assertEquals("900 B", Formatter.formatFileSize(context, 900)); in testFormatFileSize() 59 assertEquals("0.90 kB", Formatter.formatFileSize(context, 901)); in testFormatFileSize() 61 assertEquals("1.00 kB", Formatter.formatFileSize(context, bd.pow(1).longValue())); in testFormatFileSize() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BasicAdminReceiver.java | 38 public static ComponentName getComponentName(Context context) { in getComponentName() argument 39 return new ComponentName(context, BasicAdminReceiver.class); in getComponentName() 43 public void onUserAdded(Context context, Intent intent, UserHandle userHandle) { in onUserAdded() argument 44 super.onUserAdded(context, intent, userHandle); in onUserAdded() 45 sendUserBroadcast(context, ACTION_USER_ADDED, userHandle); in onUserAdded() 49 public void onUserRemoved(Context context, Intent intent, UserHandle userHandle) { in onUserRemoved() argument 50 super.onUserRemoved(context, intent, userHandle); in onUserRemoved() 51 sendUserBroadcast(context, ACTION_USER_REMOVED, userHandle); in onUserRemoved() 55 public void onUserStarted(Context context, Intent intent, UserHandle userHandle) { in onUserStarted() argument 56 super.onUserStarted(context, intent, userHandle); in onUserStarted() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Utils/ |
D | Version.java | 43 static String getVersionName(Context context) { in getVersionName() argument 44 return getVersionNameStrings(context)[0]; in getVersionName() 47 static int getVersionCode(Context context) { in getVersionCode() argument 48 return getPackageInfo(context).versionCode; in getVersionCode() 51 static private String[] getVersionNameStrings(Context context) { in getVersionNameStrings() argument 52 return getPackageInfo(context).versionName.split(" "); in getVersionNameStrings() 55 static PackageInfo getPackageInfo(Context context) { in getPackageInfo() argument 57 PackageManager packageManager = context.getPackageManager(); in getPackageInfo() 58 return packageManager.getPackageInfo(context.getPackageName(), 0); in getPackageInfo() 61 + context.getPackageName()); in getPackageInfo()
|
/cts/tests/tests/appwidget/src/android/appwidget/cts/provider/ |
D | StubbableAppWidgetProvider.java | 26 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { in onUpdate() argument 29 callbacks.onUpdate(context, appWidgetManager, appWidgetIds); in onUpdate() 34 public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, in onAppWidgetOptionsChanged() argument 38 callbacks.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions); in onAppWidgetOptionsChanged() 43 public void onDeleted(Context context, int[] appWidgetIds) { in onDeleted() argument 46 callbacks.onDeleted(context, appWidgetIds); in onDeleted() 51 public void onEnabled(Context context) { in onEnabled() argument 54 callbacks.onEnabled(context); in onEnabled() 59 public void onDisabled(Context context) { in onDisabled() argument 62 callbacks.onDisabled(context); in onDisabled() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | AutoCompleteTextViewNoIme.java | 31 public AutoCompleteTextViewNoIme(Context context) { in AutoCompleteTextViewNoIme() argument 32 super(context); in AutoCompleteTextViewNoIme() 35 public AutoCompleteTextViewNoIme(Context context, AttributeSet attrs) { in AutoCompleteTextViewNoIme() argument 36 super(context, attrs); in AutoCompleteTextViewNoIme() 39 public AutoCompleteTextViewNoIme(Context context, AttributeSet attrs, int defStyleAttr) { in AutoCompleteTextViewNoIme() argument 40 super(context, attrs, defStyleAttr); in AutoCompleteTextViewNoIme() 43 public AutoCompleteTextViewNoIme(Context context, AttributeSet attrs, int defStyleAttr, in AutoCompleteTextViewNoIme() argument 45 super(context, attrs, defStyleAttr, defStyleRes); in AutoCompleteTextViewNoIme() 48 public AutoCompleteTextViewNoIme(Context context, AttributeSet attrs, int defStyleAttr, in AutoCompleteTextViewNoIme() argument 50 super(context, attrs, defStyleAttr, defStyleRes, popupTheme); in AutoCompleteTextViewNoIme()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
D | TimerProgressBar.java | 31 public TimerProgressBar(Context context) { in TimerProgressBar() argument 32 super(context); in TimerProgressBar() 33 setHandler(context); in TimerProgressBar() 36 public TimerProgressBar(Context context, AttributeSet attrs) { in TimerProgressBar() argument 37 super(context, attrs); in TimerProgressBar() 38 setHandler(context); in TimerProgressBar() 41 public TimerProgressBar(Context context, AttributeSet attrs, int defStyleAttr) { in TimerProgressBar() argument 42 super(context, attrs, defStyleAttr); in TimerProgressBar() 43 setHandler(context); in TimerProgressBar() 47 public TimerProgressBar(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { in TimerProgressBar() argument [all …]
|
D | Version.java | 32 static String getVersionName(Context context) { in getVersionName() argument 33 return getPackageInfo(context).versionName; in getVersionName() 36 static int getVersionCode(Context context) { in getVersionCode() argument 37 return getPackageInfo(context).versionCode; in getVersionCode() 40 static PackageInfo getPackageInfo(Context context) { in getPackageInfo() argument 42 PackageManager packageManager = context.getPackageManager(); in getPackageInfo() 43 return packageManager.getPackageInfo(context.getPackageName(), 0); in getPackageInfo() 46 + context.getPackageName()); in getPackageInfo() 50 static String getMetadata(Context context, String name) { in getMetadata() argument 52 PackageManager packageManager = context.getPackageManager(); in getMetadata() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | TestSensorEnvironment.java | 58 public TestSensorEnvironment(Context context, int sensorType, int samplingPeriodUs) { in TestSensorEnvironment() argument 59 this(context, sensorType, false /* sensorMightHaveMoreListeners */, samplingPeriodUs); in TestSensorEnvironment() 74 Context context, in TestSensorEnvironment() argument 78 this(context, in TestSensorEnvironment() 97 Context context, in TestSensorEnvironment() argument 101 this(context, in TestSensorEnvironment() 121 Context context, in TestSensorEnvironment() argument 126 this(context, in TestSensorEnvironment() 127 getSensor(context, sensorType), in TestSensorEnvironment() 147 Context context, in TestSensorEnvironment() argument [all …]
|
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/ |
D | SplitAppTest.java | 84 final Context context = mBaseActivityRule.getActivity(); in shouldLoadDefault() local 85 final Resources resources = context.getResources(); in shouldLoadDefault() 91 assertActivitiesDoNotExist(context, FEATURE_A_ACTIVITY, FEATURE_B_ACTIVITY, in shouldLoadDefault() 93 assertResourcesDoNotExist(context, FEATURE_A_STRING, FEATURE_B_STRING, FEATURE_C_STRING); in shouldLoadDefault() 98 final Context context = mBaseActivityRule.getActivity().createConfigurationContext(PL); in shouldLoadPolishLocale() local 99 final Resources resources = context.getResources(); in shouldLoadPolishLocale() 105 assertActivitiesDoNotExist(context, FEATURE_A_ACTIVITY, FEATURE_B_ACTIVITY, in shouldLoadPolishLocale() 107 assertResourcesDoNotExist(context, FEATURE_A_STRING, FEATURE_B_STRING, FEATURE_C_STRING); in shouldLoadPolishLocale() 112 final Context context = mFeatureActivityRule.launchActivity( in shouldLoadFeatureADefault() local 114 final Resources resources = context.getResources(); in shouldLoadFeatureADefault() [all …]
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
D | AdminReceiver.java | 31 public static ComponentName getComponentName(Context context) { in getComponentName() argument 32 return new ComponentName(context, AdminReceiver.class); in getComponentName() 36 public void onProfileProvisioningComplete(Context context, Intent intent) { in onProfileProvisioningComplete() argument 37 super.onProfileProvisioningComplete(context, intent); in onProfileProvisioningComplete() 40 getManager(context).setProfileEnabled(getComponentName(context)); in onProfileProvisioningComplete() 41 getManager(context).setProfileName(getComponentName(context), "Corp owned Managed Profile"); in onProfileProvisioningComplete()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | DeviceAdminTestReceiver.java | 67 public void onProfileProvisioningComplete(Context context, Intent intent) { in onProfileProvisioningComplete() argument 69 setupProfile(context); in onProfileProvisioningComplete() 70 wipeIfNecessary(context, intent); in onProfileProvisioningComplete() 74 public void onBugreportSharingDeclined(Context context, Intent intent) { in onBugreportSharingDeclined() argument 76 Utils.showBugreportNotification(context, context.getString( in onBugreportSharingDeclined() 81 public void onBugreportShared(Context context, Intent intent, String bugreportFileHash) { in onBugreportShared() argument 83 Utils.showBugreportNotification(context, context.getString( in onBugreportShared() 88 public void onBugreportFailed(Context context, Intent intent, int failureCode) { in onBugreportFailed() argument 90 Utils.showBugreportNotification(context, context.getString( in onBugreportFailed() 95 public void onLockTaskModeEntering(Context context, Intent intent, String pkg) { in onLockTaskModeEntering() argument [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/view/ |
D | UnclippedBlueView.java | 26 public UnclippedBlueView(Context context) { in UnclippedBlueView() argument 27 this(context, null); in UnclippedBlueView() 30 public UnclippedBlueView(Context context, AttributeSet attrs) { in UnclippedBlueView() argument 31 this(context, attrs, 0); in UnclippedBlueView() 34 public UnclippedBlueView(Context context, AttributeSet attrs, int defStyleAttr) { in UnclippedBlueView() argument 35 this(context, attrs, defStyleAttr, 0); in UnclippedBlueView() 38 public UnclippedBlueView(Context context, AttributeSet attrs, in UnclippedBlueView() argument 40 super(context, attrs, defStyleAttr, defStyleRes); in UnclippedBlueView()
|
D | CircleClipFrameLayout.java | 27 public CircleClipFrameLayout(Context context) { in CircleClipFrameLayout() argument 28 this(context, null); in CircleClipFrameLayout() 31 public CircleClipFrameLayout(Context context, AttributeSet attrs) { in CircleClipFrameLayout() argument 32 this(context, attrs, 0); in CircleClipFrameLayout() 35 public CircleClipFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { in CircleClipFrameLayout() argument 36 this(context, attrs, defStyleAttr, 0); in CircleClipFrameLayout() 39 …public CircleClipFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRe… in CircleClipFrameLayout() argument 40 super(context, attrs, defStyleAttr, defStyleRes); in CircleClipFrameLayout()
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | TextViewNoIme.java | 30 public TextViewNoIme(Context context) { in TextViewNoIme() argument 31 super(context); in TextViewNoIme() 34 public TextViewNoIme(Context context, AttributeSet attrs) { in TextViewNoIme() argument 35 super(context, attrs); in TextViewNoIme() 38 public TextViewNoIme(Context context, AttributeSet attrs, int defStyleAttr) { in TextViewNoIme() argument 39 super(context, attrs, defStyleAttr); in TextViewNoIme() 42 public TextViewNoIme(Context context, AttributeSet attrs, int defStyleAttr, in TextViewNoIme() argument 44 super(context, attrs, defStyleAttr, defStyleRes); in TextViewNoIme()
|
D | EditTextNoIme.java | 30 public EditTextNoIme(Context context) { in EditTextNoIme() argument 31 super(context); in EditTextNoIme() 34 public EditTextNoIme(Context context, AttributeSet attrs) { in EditTextNoIme() argument 35 super(context, attrs); in EditTextNoIme() 38 public EditTextNoIme(Context context, AttributeSet attrs, int defStyleAttr) { in EditTextNoIme() argument 39 super(context, attrs, defStyleAttr); in EditTextNoIme() 42 public EditTextNoIme(Context context, AttributeSet attrs, int defStyleAttr, in EditTextNoIme() argument 44 super(context, attrs, defStyleAttr, defStyleRes); in EditTextNoIme()
|
/cts/tests/framework/base/activitymanager/app/src/android/server/am/ |
D | LifecycleLogView.java | 28 public LifecycleLogView(Context context) { in LifecycleLogView() argument 29 super(context); in LifecycleLogView() 32 public LifecycleLogView(Context context, AttributeSet attrs) { in LifecycleLogView() argument 33 this(context, attrs, 0); in LifecycleLogView() 36 public LifecycleLogView(Context context, AttributeSet attrs, int defStyleAttr) { in LifecycleLogView() argument 37 this(context, attrs, defStyleAttr, 0); in LifecycleLogView() 40 public LifecycleLogView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) in LifecycleLogView() argument 42 super(context, attrs, defStyleAttr, defStyleRes); in LifecycleLogView()
|
/cts/tests/tests/preference2/src/android/preference2/cts/ |
D | RecycleCheckPreference.java | 43 public RecycleCheckPreference(Context context, AttributeSet attrs, in RecycleCheckPreference() argument 45 super(context, attrs, defStyleAttr); in RecycleCheckPreference() 48 public RecycleCheckPreference(Context context, AttributeSet attrs, int defStyleAttr, in RecycleCheckPreference() argument 50 super(context, attrs, defStyleAttr, defStyleRes); in RecycleCheckPreference() 53 public RecycleCheckPreference(Context context, AttributeSet attrs) { in RecycleCheckPreference() argument 54 super(context, attrs); in RecycleCheckPreference() 57 public RecycleCheckPreference(Context context) { in RecycleCheckPreference() argument 58 super(context); in RecycleCheckPreference()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/ |
D | PhoneAccountUtils.java | 78 public static void registerTestPhoneAccount(Context context) { in registerTestPhoneAccount() argument 79 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestPhoneAccount() 89 public static PhoneAccount getPhoneAccount(Context context) { in getPhoneAccount() argument 90 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getPhoneAccount() 99 public static void unRegisterTestPhoneAccount(Context context) { in unRegisterTestPhoneAccount() argument 100 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestPhoneAccount() 109 public static void registerTestSelfManagedPhoneAccount(Context context) { in registerTestSelfManagedPhoneAccount() argument 110 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestSelfManagedPhoneAccount() 120 public static void unRegisterTestSelfManagedPhoneAccount(Context context) { in unRegisterTestSelfManagedPhoneAccount() argument 121 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestSelfManagedPhoneAccount() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/ |
D | NfcDialogs.java | 30 static AlertDialog createNotEnabledDialog(final Context context) { in createNotEnabledDialog() argument 31 return new AlertDialog.Builder(context) in createNotEnabledDialog() 39 context.startActivity(intent); in createNotEnabledDialog() 45 static AlertDialog createNdefPushNotEnabledDialog(final Context context) { 46 return new AlertDialog.Builder(context) 54 context.startActivity(intent); 60 public static AlertDialog createHceTapReaderDialog(final Context context, String message) { 61 String baseString = context.getString(R.string.nfc_hce_tap_reader_message); 62 return new AlertDialog.Builder(context) 70 public static AlertDialog createChangeForegroundDialog(final Context context) { [all …]
|
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/ |
D | TestUtils.java | 61 static int getLocationMode(Context context) { in getLocationMode() argument 62 return Settings.Secure.getInt(context.getContentResolver(), in getLocationMode() 69 static void setLocationMode(Context context, int mode) { in setLocationMode() argument 70 Settings.Secure.putInt(context.getContentResolver(), Settings.Secure.LOCATION_MODE, in setLocationMode() 77 static boolean isLocationOn(Context context) { in isLocationOn() argument 78 return getLocationMode(context) != Settings.Secure.LOCATION_MODE_OFF; in isLocationOn() 84 static void enableLocation(Context context) { in enableLocation() argument 85 setLocationMode(context, Settings.Secure.LOCATION_MODE_SENSORS_ONLY); in enableLocation() 91 static void disableLocation(Context context) { in disableLocation() argument 92 setLocationMode(context, Settings.Secure.LOCATION_MODE_OFF); in disableLocation()
|
/cts/tests/tests/os/src/android/os/health/cts/ |
D | SystemHealthManagerTest.java | 38 final Context context = getInstrumentation().getTargetContext(); in testTakeMyUidSnapshot() local 39 final SystemHealthManager healthy = SystemHealthManager.from(context); in testTakeMyUidSnapshot() 49 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotWithMe() local 50 final SystemHealthManager healthy = SystemHealthManager.from(context); in testTakeUidSnapshotWithMe() 60 final Context context = getInstrumentation().getTargetContext(); in testTakeMyUidSnapshotWithSystem() local 61 final SystemHealthManager healthy = SystemHealthManager.from(context); in testTakeMyUidSnapshotWithSystem() 78 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotsWithEmptyArray() local 79 final SystemHealthManager healthy = SystemHealthManager.from(context); in testTakeUidSnapshotsWithEmptyArray() 90 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotsWithMe() local 91 final SystemHealthManager healthy = SystemHealthManager.from(context); in testTakeUidSnapshotsWithMe() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | MockViewStub.java | 24 public MockViewStub(Context context) { in MockViewStub() argument 25 super(context); in MockViewStub() 28 public MockViewStub(Context context, AttributeSet attrs) { in MockViewStub() argument 29 super(context, attrs); in MockViewStub() 32 public MockViewStub(Context context, AttributeSet attrs, int defStyle) { in MockViewStub() argument 33 super(context, attrs, defStyle); in MockViewStub()
|