Home
last modified time | relevance | path

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

12345678910>>...20

/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 …]
DP2pClientTestSuite.java35 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()
DGoNegReqTestSuite.java35 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 GoNegReqPbcTestCase(context)); in initialize()
65 sTestSuite.add(new GoNegReqPinTestCase(context)); in initialize()
/cts/tests/tests/hardware/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/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 …]
DAppWidgetProviderCallbacks.java36 public abstract void onUpdate(Context context, AppWidgetManager appWidgetManager, in onUpdate() argument
39 public abstract void onAppWidgetOptionsChanged(Context context, in onAppWidgetOptionsChanged() argument
42 public abstract void onDeleted(Context context, int[] appWidgetIds); in onDeleted() argument
44 public abstract void onEnabled(Context context); in onEnabled() argument
46 public abstract void onDisabled(Context context); in onDisabled() argument
48 public abstract void onRestored(Context context, int[] oldWidgetIds, int[] newWidgetIds); in onRestored() argument
/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.java26 static String getVersionName(Context context) { in getVersionName() argument
27 return getPackageInfo(context).versionName; in getVersionName()
30 static int getVersionCode(Context context) { in getVersionCode() argument
31 return getPackageInfo(context).versionCode; in getVersionCode()
34 static PackageInfo getPackageInfo(Context context) { in getPackageInfo() argument
36 PackageManager packageManager = context.getPackageManager(); in getPackageInfo()
37 return packageManager.getPackageInfo(context.getPackageName(), 0); in getPackageInfo()
40 + context.getPackageName()); in getPackageInfo()
/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/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/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/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/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/managedprovisioning/
DDeviceAdminTestReceiver.java50 public void onProfileProvisioningComplete(Context context, Intent intent) { in onProfileProvisioningComplete() argument
52 setupProfile(context); in onProfileProvisioningComplete()
56 public void onBugreportSharingDeclined(Context context, Intent intent) { in onBugreportSharingDeclined() argument
58 Utils.showBugreportNotification(context, context.getString( in onBugreportSharingDeclined()
63 public void onBugreportShared(Context context, Intent intent, String bugreportFileHash) { in onBugreportShared() argument
65 Utils.showBugreportNotification(context, context.getString( in onBugreportShared()
70 public void onBugreportFailed(Context context, Intent intent, int failureCode) { in onBugreportFailed() argument
72 Utils.showBugreportNotification(context, context.getString( in onBugreportFailed()
76 private void setupProfile(Context context) { in setupProfile() argument
77 …DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SER… in setupProfile()
[all …]
/cts/tests/admin/src/android/admin/cts/
DDeviceAdminReceiverTest.java142 public void onPasswordChanged(Context context, Intent intent) { in onPasswordChanged() argument
143 super.onPasswordChanged(context, intent); in onPasswordChanged()
148 public void onPasswordFailed(Context context, Intent intent) { in onPasswordFailed() argument
149 super.onPasswordFailed(context, intent); in onPasswordFailed()
154 public void onPasswordSucceeded(Context context, Intent intent) { in onPasswordSucceeded() argument
155 super.onPasswordSucceeded(context, intent); in onPasswordSucceeded()
160 public void onEnabled(Context context, Intent intent) { in onEnabled() argument
161 super.onEnabled(context, intent); in onEnabled()
166 public CharSequence onDisableRequested(Context context, Intent intent) { in onDisableRequested() argument
172 public void onDisabled(Context context, Intent intent) { in onDisabled() 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 …]
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyBroadcastReceiver.java74 public void onReceive(Context context, Intent intent) { in onReceive() argument
79 increaseCounter(context, action); in onReceive()
82 setResultDataFromCounter(context, intent); in onReceive()
85 getRestrictBackgroundStatus(context, intent); in onReceive()
88 checkNetwork(context, intent); in onReceive()
96 sendNotification(context, intent); in onReceive()
103 private void increaseCounter(Context context, String action) { in increaseCounter() argument
104 final SharedPreferences prefs = context.getSharedPreferences(mName, Context.MODE_PRIVATE); in increaseCounter()
110 private int getCounter(Context context, String action, String receiverName) { in getCounter() argument
111 final SharedPreferences prefs = context.getSharedPreferences(receiverName, in getCounter()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DMockViewStub.java24 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()
DTestButton.java25 public TestButton(Context context) { in TestButton() argument
26 super(context); in TestButton()
29 public TestButton(Context context, AttributeSet attrs) { in TestButton() argument
30 super(context, attrs); in TestButton()
33 public TestButton(Context context, AttributeSet attrs, int defStyle) { in TestButton() argument
34 super(context, attrs, defStyle); in TestButton()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DMockListener.java92 public void onReceive(Context context, Intent intent) { in onCreate()
246 public static void resetListenerData(Context context) { in resetListenerData() argument
247 sendCommand(context, SERVICE_RESET, null, 0); in resetListenerData()
250 public static void probeListenerStatus(Context context, StatusCatcher catcher) { in probeListenerStatus() argument
251 requestStatus(context, SERVICE_CHECK, catcher); in probeListenerStatus()
254 public static void probeFilter(Context context, IntegerResultCatcher catcher) { in probeFilter() argument
255 requestIntegerResult(context, SERVICE_DND, catcher); in probeFilter()
258 public static void probeListenerPosted(Context context, StringListResultCatcher catcher) { in probeListenerPosted() argument
259 requestStringListResult(context, SERVICE_POSTED, catcher); in probeListenerPosted()
262 public static void probeListenerOrder(Context context, StringListResultCatcher catcher) { in probeListenerOrder() argument
[all …]
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DBaseBootReceiver.java31 public void onReceive(Context context, Intent intent) { in onReceive() argument
33 context = context.createDeviceProtectedStorageContext(); in onReceive()
34 final File probe = new File(context.getFilesDir(), in onReceive()
35 getBootCount(context) + "." + intent.getAction()); in onReceive()
44 private static int getBootCount(Context context) throws Exception { in getBootCount() argument
45 return Settings.Global.getInt(context.getContentResolver(), Settings.Global.BOOT_COUNT); in getBootCount()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DSystemUtil.java25 public static long getFreeDiskSize(Context context) { in getFreeDiskSize() argument
26 final StatFs statFs = new StatFs(context.getFilesDir().getAbsolutePath()); in getFreeDiskSize()
30 public static long getFreeMemory(Context context) { in getFreeMemory() argument
32 ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(info); in getFreeMemory()
36 public static long getTotalMemory(Context context) { in getTotalMemory() argument
38 ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(info); in getTotalMemory()

12345678910>>...20