HomeSort by relevance Sort by last modified time
    Searched refs:mContext (Results 151 - 175 of 5445) sorted by null

1 2 3 4 5 67 8 91011>>

  /cts/tests/tests/widget/src/android/widget/cts/
ViewSwitcherTest.java 48 private Context mContext;
52 mContext = InstrumentationRegistry.getTargetContext();
57 new ViewSwitcher(mContext);
59 new ViewSwitcher(mContext, null);
61 XmlPullParser parser = mContext.getResources().getXml(R.layout.viewswitcher_layout);
63 new ViewSwitcher(mContext, attrs);
68 final ViewSwitcher viewSwitcher = new ViewSwitcher(mContext);
77 final ViewSwitcher viewSwitcher = new ViewSwitcher(mContext);
79 ListView lv1 = new ListView(mContext);
80 ListView lv2 = new ListView(mContext);
    [all...]
CursorAdapterTest.java 77 private Context mContext;
81 mContext = InstrumentationRegistry.getTargetContext();
82 File dbDir = mContext.getDir("tests", Context.MODE_PRIVATE);
95 final LayoutInflater inflater = LayoutInflater.from(mContext);
113 new MockCursorAdapter(mContext, mCursor);
117 new MockCursorAdapter(mContext, mCursor, true);
134 cursorAdapter.init(mContext, null, false);
135 assertSame(mContext, cursorAdapter.getContext());
142 cursorAdapter.init(mContext, null, true);
143 assertSame(mContext, cursorAdapter.getContext())
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
MagnificationGesturesPreferenceControllerTest.java 41 private Context mContext;
48 mContext = RuntimeEnvironment.application;
49 mController = new MagnificationGesturesPreferenceController(mContext, "pref_key");
50 mPreference = new Preference(mContext);
62 Settings.System.putInt(mContext.getContentResolver(),
66 .isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
68 Settings.System.putInt(mContext.getContentResolver(),
72 .isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
80 .isEqualTo(mContext.getString(R.string.
86 Settings.System.putInt(mContext.getContentResolver()
    [all...]
MagnificationNavbarPreferenceControllerTest.java 49 private Context mContext;
56 mContext = spy(RuntimeEnvironment.application);
57 mController = new MagnificationNavbarPreferenceController(mContext, "test_key");
58 mPreference = new Preference(mContext);
87 Settings.System.putInt(mContext.getContentResolver(),
91 .isEqualTo(mContext.getText(R.string.accessibility_feature_state_on));
93 Settings.System.putInt(mContext.getContentResolver(),
97 .isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
105 .isEqualTo(mContext.getString(R.string.
111 Settings.System.putInt(mContext.getContentResolver()
    [all...]
NotificationVibrationIntensityPreferenceControllerTest.java 52 private Context mContext;
62 mContext = spy(RuntimeEnvironment.application);
63 mResources = spy(mContext.getResources());
64 when(mContext.getResources()).thenReturn(mResources);
67 mController = new NotificationVibrationIntensityPreferenceController(mContext) {
74 mPreference = new Preference(mContext);
93 Settings.System.putInt(mContext.getContentResolver(),
97 .isEqualTo(mContext.getString(R.string.accessibility_vibration_intensity_low));
99 Settings.System.putInt(mContext.getContentResolver(),
103 .isEqualTo(mContext.getString(R.string.accessibility_vibration_intensity_high))
    [all...]
  /frameworks/base/core/tests/coretests/src/android/app/backup/
FullBackupTest.java 42 private Context mContext;
51 mContext = getContext();
63 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext);
73 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(),
85 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext);
95 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(),
110 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext);
117 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(),
131 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext);
141 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath()
    [all...]
  /packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
NotificationControllerTest.java 47 private Context mContext;
59 mContext = application.getApplicationContext();
64 mController.onReceive(mContext,
68 mController.onReceive(mContext,
77 mController.onReceive(mContext,
80 mController.onReceive(mContext,
87 mController.onReceive(mContext,
96 mController.onReceive(mContext,
99 mController.onReceive(mContext,
106 mController.onReceive(mContext,
    [all...]
  /cts/tests/app/src/android/app/cts/
PendingIntentTest.java 45 private Context mContext;
57 mContext = getContext();
143 mIntent.setClass(mContext, PendingIntentStubActivity.class);
145 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent,
147 assertEquals(mContext.getPackageName(), mPendingIntent.getTargetPackage());
157 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent,
161 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent,
183 mIntent.setClass(mContext, MockReceiver.class);
184 mPendingIntent = PendingIntent.getBroadcast(mContext, 1, mIntent,
194 mPendingIntent = PendingIntent.getBroadcast(mContext, 1, mIntent
    [all...]
  /cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/
ChangeDefaultUris.java 39 FileCopyHelper copier = new FileCopyHelper(mContext);
53 mContext.getContentResolver()
56 RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_RINGTONE, uri);
57 RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_ALARM, uri);
59 mContext, RingtoneManager.TYPE_NOTIFICATION, uri);
64 mContext.getContentResolver()
70 Uri uri = RingtoneManager.getValidRingtoneUri(mContext);
71 RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_RINGTONE, uri);
72 RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_ALARM, uri);
74 mContext, RingtoneManager.TYPE_NOTIFICATION, uri)
    [all...]
  /cts/hostsidetests/backup/RestoreAnyVersion/src/
RestoreAnyVersionTest.java 58 private Context mContext;
63 mContext = getTargetContext();
73 PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(
74 mContext.getPackageName(), 0);
92 PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(
93 mContext.getPackageName(), 0);
104 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE);
107 mContext.getPackageManager()
108 .getPackageInfo(mContext.getPackageName(), 0).versionCode);
113 SharedPreferences prefs = mContext.getSharedPreferences(TEST_PREFS_1, MODE_PRIVATE)
    [all...]
  /frameworks/base/core/java/android/content/
ClipboardManager.java 50 private final Context mContext;
86 mContext = context;
104 mService.setPrimaryClip(clip, mContext.getOpPackageName());
117 mService.clearPrimaryClip(mContext.getOpPackageName());
130 return mService.getPrimaryClip(mContext.getOpPackageName());
144 return mService.getPrimaryClipDescription(mContext.getOpPackageName());
155 return mService.hasPrimaryClip(mContext.getOpPackageName());
166 mPrimaryClipChangedServiceListener, mContext.getOpPackageName());
197 return clip.getItemAt(0).coerceToText(mContext);
218 return mService.hasClipboardText(mContext.getOpPackageName())
    [all...]
  /frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
NfcTile.java 57 mContext.registerReceiver(mNfcReceiver,
60 mContext.unregisterReceiver(mNfcReceiver);
66 return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC);
94 return mContext.getString(R.string.quick_settings_nfc_label);
99 final Drawable mEnable = mContext.getDrawable(R.drawable.ic_qs_nfc_enabled);
100 final Drawable mDisable = mContext.getDrawable(R.drawable.ic_qs_nfc_disabled);
104 state.label = mContext.getString(R.string.quick_settings_nfc_label);
118 return mContext.getString(R.string.quick_settings_nfc_on);
120 return mContext.getString(R.string.quick_settings_nfc_off);
127 mAdapter = NfcAdapter.getNfcAdapter(mContext);
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/display/
AmbientDisplaySettingsTest.java 43 private Context mContext;
48 mContext = RuntimeEnvironment.application;
55 new AmbientDisplayAlwaysOnPreferenceController(mContext, "key"));
59 mTestFragment.onAttach(mContext);
67 new AmbientDisplayNotificationsPreferenceController(mContext, "key"));
71 mTestFragment.onAttach(mContext);
78 new DoubleTapScreenPreferenceController(mContext, "key"));
81 mTestFragment.onAttach(mContext);
88 new PickupGesturePreferenceController(mContext, "key"));
91 mTestFragment.onAttach(mContext);
    [all...]
NightDisplayActivationPreferenceControllerTest.java 47 private Context mContext;
53 mContext = RuntimeEnvironment.application;
54 mPreference = new LayoutPreference(mContext, R.layout.night_display_activation_button);
56 mController = new NightDisplayActivationPreferenceController(mContext,
78 new NightDisplayActivationPreferenceController(mContext,"night_display_activated");
85 new NightDisplayActivationPreferenceController(mContext, "bad_key");
91 Secure.putInt(mContext.getContentResolver(), Secure.NIGHT_DISPLAY_ACTIVATED, 0);
97 assertThat(Secure.getInt(mContext.getContentResolver(), Secure.NIGHT_DISPLAY_ACTIVATED, -1))
103 Secure.putInt(mContext.getContentResolver(), Secure.NIGHT_DISPLAY_ACTIVATED, 1);
109 assertThat(Secure.getInt(mContext.getContentResolver(), Secure.NIGHT_DISPLAY_ACTIVATED, -1)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/
AutoBatterySeekBarPreferenceControllerTest.java 44 private Context mContext;
57 mContext = RuntimeEnvironment.application;
58 mPreference = new SeekBarPreference(mContext);
60 mController = new AutoBatterySeekBarPreferenceController(mContext, mLifecycle);
65 Settings.Global.putInt(mContext.getContentResolver(),
82 Settings.Global.putInt(mContext.getContentResolver(),
93 Settings.Global.putInt(mContext.getContentResolver(),
98 assertThat(Settings.Global.getInt(mContext.getContentResolver(),
104 Settings.Global.putInt(mContext.getContentResolver(),
114 Settings.Global.putInt(mContext.getContentResolver()
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
WifiSliceBuilderTest.java 54 private Context mContext;
58 mContext = spy(RuntimeEnvironment.application);
61 Resources resources = spy(mContext.getResources());
63 doReturn(resources).when(mContext).getResources();
71 final Slice wifiSlice = WifiSliceBuilder.getSlice(mContext);
72 final SliceMetadata metadata = SliceMetadata.from(mContext, wifiSlice);
78 final IconCompat expectedToggleIcon = IconCompat.createWithResource(mContext,
83 SliceTester.assertTitle(sliceItems, mContext.getString(R.string.wifi_settings));
90 final WifiManager wifiManager = mContext.getSystemService(WifiManager.class);
92 WifiSliceBuilder.handleUriChange(mContext, intent)
    [all...]
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
ScreenDecorationsTest.java 76 mView = spy(new StatusBarWindowView(mContext, null));
79 mContext.putComponent(StatusBar.class, mStatusBar);
81 Display display = mContext.getSystemService(WindowManager.class).getDefaultDisplay();
83 mContext.addMockSystemService(WindowManager.class, mWindowManager);
92 mScreenDecorations.mContext = mContext;
93 mScreenDecorations.mComponents = mContext.getComponents();
100 mContext.getOrCreateTestableResources().addOverride(
102 mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius, 0);
103 mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius_top, 0)
    [all...]
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/euicc/
EuiccCardControllerTest.java 76 mSp = PreferenceManager.getDefaultSharedPreferences(mContext);
80 mContext.getContentResolver(), Settings.Global.BOOT_COUNT, -1);
107 Settings.Global.resetToDefaults(mContext.getContentResolver(), KEY_LAST_BOOT_COUNT);
109 Settings.Global.putInt(mContext.getContentResolver(),
112 SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
119 Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.BOOT_COUNT, 0);
120 assertTrue(EuiccCardController.isBootUp(mContext));
123 Settings.Global.resetToDefaults(mContext.getContentResolver(), KEY_LAST_BOOT_COUNT);
124 assertTrue(EuiccCardController.isBootUp(mContext));
127 Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.BOOT_COUNT, 1)
    [all...]
  /external/conscrypt/common/src/main/java/org/conscrypt/
OpenSSLX509Certificate.java 63 private transient final long mContext;
70 mContext = ctx;
73 notBefore = toDate(NativeCrypto.X509_get_notBefore(mContext, this));
74 notAfter = toDate(NativeCrypto.X509_get_notAfter(mContext, this));
79 mContext = ctx;
205 NativeCrypto.get_X509_ext_oids(mContext, this, NativeCrypto.EXTENSION_TYPE_CRITICAL);
213 && (NativeCrypto.get_X509_ext_oids(mContext, this,
223 return NativeCrypto.X509_get_ext_oid(mContext, this, oid);
229 NativeCrypto.get_X509_ext_oids(mContext, this, NativeCrypto.EXTENSION_TYPE_NON_CRITICAL);
237 && (NativeCrypto.get_X509_ext_oids(mContext, this
    [all...]
  /packages/apps/Settings/src/com/android/settings/notification/
ZenModeSettings.java 96 private Context mContext;
99 mContext = context;
121 return mContext.getString(R.string.zen_sound_all_muted);
123 return mContext.getString(R.string.zen_sound_one_allowed,
126 return mContext.getString(R.string.zen_sound_two_allowed,
130 return mContext.getString(R.string.zen_sound_three_allowed,
135 return mContext.getString(R.string.zen_sound_none_muted);
145 return mContext.getString(R.string.zen_mode_no_exceptions);
147 return mContext.getString(R.string.zen_mode_calls_summary_one,
150 return mContext.getString(R.string.zen_mode_calls_summary_two
    [all...]
  /cts/tests/tests/view/src/android/view/cts/
ContextThemeWrapperTest.java 43 private Context mContext;
60 mContext = InstrumentationRegistry.getTargetContext();
67 new ContextThemeWrapper(mContext, R.style.TextAppearance);
69 new ContextThemeWrapper(mContext, mContext.getTheme());
75 mContext, SYSTEM_DEFAULT_THEME);
90 new MockContextThemeWrapper(mContext, R.style.TextAppearance);
96 assertEquals(mContext.getSystemService(Context.ACTIVITY_SERVICE),
98 assertNotSame(mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE),
111 attachBaseContext(new ContextThemeWrapper(mContext,
    [all...]
  /frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
PowerUtilTest.java 50 private Context mContext;
55 mContext = spy(RuntimeEnvironment.application);
60 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
64 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
86 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
90 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
113 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
117 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
130 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext,
134 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext,
    [all...]
  /frameworks/support/compat/src/androidTest/java/androidx/core/content/pm/
ShortcutInfoCompatTest.java 53 private Context mContext;
58 mContext = spy(new ContextWrapper(InstrumentationRegistry.getContext()));
59 mAction = new Intent(Intent.ACTION_VIEW).setPackage(mContext.getPackageName());
61 mBuilder = new ShortcutInfoCompat.Builder(mContext, "test-shortcut")
64 .setIcon(IconCompat.createWithResource(mContext, R.drawable.test_drawable_red));
70 mBuilder.setActivity(new ComponentName(mContext, TestActivity.class))
82 mBuilder.setActivity(new ComponentName(mContext, TestActivity.class))
90 verifyBadgeBitmap(intent, ContextCompat.getColor(mContext, R.color.test_red),
91 ContextCompat.getColor(mContext, R.color.test_blue));
96 ApplicationInfo appInfo = spy(mContext.getApplicationInfo())
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/search/
InlinePayloadTest.java 24 private Context mContext;
28 mContext = RuntimeEnvironment.application;
35 Settings.Secure.putInt(mContext.getContentResolver(), KEY, currentValue);
37 int newValue = payload.getValue(mContext);
46 Settings.Global.putInt(mContext.getContentResolver(), KEY, currentValue);
48 int newValue = payload.getValue(mContext);
57 Settings.System.putInt(mContext.getContentResolver(), KEY, currentValue);
59 int newValue = payload.getValue(mContext);
68 ContentResolver resolver = mContext.getContentResolver();
71 payload.setValue(mContext, newValue)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/support/
NewDeviceIntroSuggestionActivityTest.java 56 private Context mContext;
63 mContext = RuntimeEnvironment.application;
64 mShadowPackageManager = Shadows.shadowOf(mContext.getPackageManager());
81 final Intent intent = NewDeviceIntroSuggestionActivity.getLaunchIntent(mContext);
84 assertThat(isSuggestionComplete(mContext)).isFalse();
99 final Intent intent = NewDeviceIntroSuggestionActivity.getLaunchIntent(mContext);
102 assertThat(isSuggestionComplete(mContext)).isTrue();
111 assertThat(isSuggestionComplete(mContext)).isTrue();
120 assertThat(isSuggestionComplete(mContext)).isTrue();
127 assertThat(isSuggestionComplete(mContext)).isTrue()
    [all...]

Completed in 302 milliseconds

1 2 3 4 5 67 8 91011>>