Home
last modified time | relevance | path

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

12345678910>>...29

/cts/tests/tests/shortcutmanager/throttling/src/android/content/pm/cts/shortcutmanager/throttling/
DShortcutManagerThrottlingTestReceiver.java42 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/tests/tests/text/src/android/text/format/cts/
DFormatterTest.java48 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/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/
DServReqTestSuite.java27 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 …]
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/
DSplitAppTest.java79 final Context context = mBaseActivityRule.getActivity(); in shouldLoadDefault() local
80 final Resources resources = context.getResources(); in shouldLoadDefault()
86 assertActivitiesDoNotExist(context, FEATURE_A_ACTIVITY, FEATURE_B_ACTIVITY, in shouldLoadDefault()
88 assertResourcesDoNotExist(context, FEATURE_A_STRING, FEATURE_B_STRING, FEATURE_C_STRING); in shouldLoadDefault()
93 final Context context = mBaseActivityRule.getActivity().createConfigurationContext(PL); in shouldLoadPolishLocale() local
94 final Resources resources = context.getResources(); in shouldLoadPolishLocale()
100 assertActivitiesDoNotExist(context, FEATURE_A_ACTIVITY, FEATURE_B_ACTIVITY, in shouldLoadPolishLocale()
102 assertResourcesDoNotExist(context, FEATURE_A_STRING, FEATURE_B_STRING, FEATURE_C_STRING); in shouldLoadPolishLocale()
107 final Context context = mFeatureActivityRule.launchActivity( in shouldLoadFeatureADefault() local
109 final Resources resources = context.getResources(); in shouldLoadFeatureADefault()
[all …]
/cts/tests/sensor/src/android/hardware/cts/helpers/
DTestSensorEnvironment.java58 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/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Utils/
DVersion.java43 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/
DStubbableAppWidgetProvider.java26 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/apps/CtsVerifier/src/com/android/cts/verifier/
DTimerProgressBar.java31 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 …]
DVersion.java32 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/tests/widget/src/android/widget/cts/
DAutoCompleteTextViewNoIme.java31 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/telecom/
DPhoneAccountUtils.java77 public static void registerTestPhoneAccount(Context context) { in registerTestPhoneAccount() argument
78 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestPhoneAccount()
88 public static PhoneAccount getPhoneAccount(Context context) { in getPhoneAccount() argument
89 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getPhoneAccount()
98 public static void unRegisterTestPhoneAccount(Context context) { in unRegisterTestPhoneAccount() argument
99 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestPhoneAccount()
108 public static void registerTestSelfManagedPhoneAccount(Context context) { in registerTestSelfManagedPhoneAccount() argument
109 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestSelfManagedPhoneAccount()
119 public static void unRegisterTestSelfManagedPhoneAccount(Context context) { in unRegisterTestSelfManagedPhoneAccount() argument
120 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestSelfManagedPhoneAccount()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DDeviceAdminTestReceiver.java52 public void onProfileProvisioningComplete(Context context, Intent intent) { in onProfileProvisioningComplete() argument
54 setupProfile(context); in onProfileProvisioningComplete()
55 wipeIfNecessary(context, intent); in onProfileProvisioningComplete()
59 public void onBugreportSharingDeclined(Context context, Intent intent) { in onBugreportSharingDeclined() argument
61 Utils.showBugreportNotification(context, context.getString( in onBugreportSharingDeclined()
66 public void onBugreportShared(Context context, Intent intent, String bugreportFileHash) { in onBugreportShared() argument
68 Utils.showBugreportNotification(context, context.getString( in onBugreportShared()
73 public void onBugreportFailed(Context context, Intent intent, int failureCode) { in onBugreportFailed() argument
75 Utils.showBugreportNotification(context, context.getString( in onBugreportFailed()
79 private void setupProfile(Context context) { in setupProfile() argument
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/
DNfcDialogs.java30 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/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/
DAdminReceiver.java31 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/tests/tests/os/src/android/os/health/cts/
DSystemHealthManagerTest.java38 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/text/src/android/text/method/cts/
DEditTextNoIme.java30 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()
DTextViewNoIme.java30 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()
/cts/hostsidetests/services/activityandwindowmanager/activitymanager/app/src/android/server/cts/
DLifecycleLogView.java28 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/uirendering/src/android/uirendering/cts/testclasses/view/
DUnclippedBlueView.java26 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()
DCircleClipFrameLayout.java27 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/apps/NotificationBot/src/com/android/cts/robot/
DNotificationBot.java61 public void onReceive(Context context, Intent intent) { in onReceive() argument
74 (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in onReceive()
86 (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in onReceive()
90 testShortcutResetSetupNotification(context, intent); in onReceive()
93 testShortcutResetInlineReplyReceived(context, intent); in onReceive()
104 private static void testShortcutResetSetupNotification(Context context, Intent intent) { in testShortcutResetSetupNotification() argument
105 final NotificationManager nm = context.getSystemService(NotificationManager.class); in testShortcutResetSetupNotification()
108 final ShortcutManager sm = context.getSystemService(ShortcutManager.class); in testShortcutResetSetupNotification()
122 sendShortcutResetReply(context, intent, in testShortcutResetSetupNotification()
130 PendingIntent.getBroadcast(context, 0, in testShortcutResetSetupNotification()
[all …]
/cts/tests/tests/preference2/src/android/preference2/cts/
DRecycleCheckPreference.java43 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/tests/tests/bluetooth/src/android/bluetooth/cts/
DTestUtils.java61 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/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DMockListener.java111 public void onReceive(Context context, Intent intent) { in onCreate()
314 public static void resetListenerData(Context context) { in resetListenerData() argument
315 sendCommand(context, SERVICE_RESET, null, 0); in resetListenerData()
318 public static void probeListenerStatus(Context context, StatusCatcher catcher) { in probeListenerStatus() argument
319 requestStatus(context, SERVICE_CHECK, catcher); in probeListenerStatus()
322 public static void probeFilter(Context context, IntegerResultCatcher catcher) { in probeFilter() argument
323 requestIntegerResult(context, SERVICE_DND, catcher); in probeFilter()
326 public static void probeListenerPosted(Context context, StringListResultCatcher catcher) { in probeListenerPosted() argument
327 requestStringListResult(context, SERVICE_POSTED, catcher); in probeListenerPosted()
330 public static void probeListenerPosted(Context context, NotificationResultCatcher catcher) { in probeListenerPosted() argument
[all …]
/cts/tests/tests/widget/src/android/widget/cts/util/
DListItemFactory.java42 … public static View twoButtonsSeparatedByFiller(int position, Context context, int desiredHeight) { in twoButtonsSeparatedByFiller() argument
48 final LinearLayout ll = new LinearLayout(context); in twoButtonsSeparatedByFiller()
56 final Button topButton = new Button(context); in twoButtonsSeparatedByFiller()
62 final TextView middleFiller = new TextView(context); in twoButtonsSeparatedByFiller()
69 final Button bottomButton = new Button(context); in twoButtonsSeparatedByFiller()
91 public static View horizontalButtonSlots(Context context, int desiredHeight, Slot... slots) { in horizontalButtonSlots() argument
93 final LinearLayout ll = new LinearLayout(context); in horizontalButtonSlots()
119 final Button button = new Button(context); in horizontalButtonSlots()
123 ll.addView(new View(context), lp); in horizontalButtonSlots()
127 final Button button = new Button(context); in horizontalButtonSlots()
[all …]

12345678910>>...29