/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/defaultapps/ |
H A D | DefaultPaymentSettingsPreferenceControllerTest.java | 51 private Context mContext; field in class:DefaultPaymentSettingsPreferenceControllerTest 66 when(mContext.getApplicationContext()).thenReturn(mContext); 67 when(mContext.getPackageManager()).thenReturn(mPackageManager); 68 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); 69 mController = new DefaultPaymentSettingsPreferenceController(mContext);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
H A D | UtilsTest.java | 56 private Context mContext; field in class:UtilsTest 66 FakeFeatureFactory.setupForTest(mContext); 67 mFakeFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext); 73 when(mContext.getString(anyInt(), anyString())).thenReturn("testMessage"); 74 Utils.showConnectingError(mContext, "testName", mock(LocalBluetoothManager.class)); 76 verify(mMetricsFeatureProvider).visible(eq(mContext), anyInt(),
|
H A D | BluetoothDetailsButtonsControllerTest.java | 54 mController = new BluetoothDetailsButtonsController(mContext, mFragment, mCachedDevice, 56 mLeftButton = new Button(mContext); 57 mRightButton = new Button(mContext); 58 mLayoutPreference = new LayoutPreference(mContext, R.layout.app_action_buttons); 71 mContext.getString(R.string.bluetooth_device_context_disconnect)); 72 assertThat(mRightButton.getText()).isEqualTo(mContext.getString(R.string.forget)); 88 mContext.getString(R.string.bluetooth_device_context_connect)); 99 mContext.getString(R.string.bluetooth_device_context_disconnect)); 105 mContext.getString(R.string.bluetooth_device_context_connect)); 119 mContext [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/conditional/ |
H A D | DndConditionTest.java | 46 private Context mContext; field in class:DndConditionTest 51 when(mConditionManager.getContext()).thenReturn(mContext); 52 when(mContext.getPackageManager()).thenReturn(mPackageManager); 65 verify(mContext).registerReceiver(any(DndCondition.Receiver.class), 85 verify(mContext, times(2)).registerReceiver(any(DndCondition.Receiver.class), 94 verify(mContext).unregisterReceiver(any(DndCondition.Receiver.class));
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/ |
H A D | StorageItemPreferenceControllerTest.java | 74 private Context mContext; field in class:StorageItemPreferenceControllerTest 88 mContext = spy(RuntimeEnvironment.application.getApplicationContext()); 89 FakeFeatureFactory.setupForTest(mContext); 90 mFakeFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext); 95 mController = new StorageItemPreferenceController(mContext, mFragment, mVolume, mSvp); 96 mPreference = new StorageItemPreference(mContext); 99 LayoutInflater inflater = LayoutInflater.from(mContext); 101 mPreference.getLayoutResource(), new LinearLayout(mContext), false); 112 mContext.getString(R.string.memory_calculating_size)); 180 mController = new StorageItemPreferenceController(mContext, mFragmen [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
H A D | AutoRotatePreferenceControllerTest.java | 56 private Context mContext; field in class:AutoRotatePreferenceControllerTest 67 FakeFeatureFactory.setupForTest(mContext); 71 when(mContext.getPackageManager()).thenReturn(mPackageManager); 72 when(mContext.getContentResolver()).thenReturn(mContentResolver); 74 mController = new AutoRotatePreferenceController(mContext, mLifecycle); 87 when(mContext.getResources().getBoolean(anyInt())).thenReturn(true);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
H A D | ZenModePreferenceControllerTest.java | 56 private Context mContext; field in class:ZenModePreferenceControllerTest 65 mContext = shadowApplication.getApplicationContext(); 66 mController = new ZenModePreferenceController(mContext); 68 mSummaryBuilder = spy(new ZenModeSettings.SummaryBuilder(mContext)); 83 verify(mPreference).setSummary(mContext.getString(R.string.zen_mode_settings_summary_off)); 87 verify(mPreference).setSummary(mContext.getResources().getQuantityString(
|
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/ |
H A D | AppSettingsTest.java | 42 @Mock private Context mContext; field in class:AppSettingsTest 48 when(mContext.getSystemService(eq(Context.APP_OPS_SERVICE))).thenReturn(mAppOps); 63 assertTrue(appHasVpnPermission(mContext, mockApp)); 68 assertTrue(appHasVpnPermission(mContext, mockApp)); 73 assertFalse(appHasVpnPermission(mContext, mockApp)); 78 assertFalse(appHasVpnPermission(mContext, mockApp));
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/ |
H A D | BluetoothInputDeviceConnector.java | 80 private Context mContext; field in class:BluetoothInputDeviceConnector 85 InputManager inputManager = (InputManager) mContext.getSystemService(Context.INPUT_SERVICE); 112 if (BluetoothDevicePairer.hasValidInputDevice(mContext, new int[] {deviceId})) { 126 InputManager inputManager = (InputManager) mContext.getSystemService(Context.INPUT_SERVICE); 149 mContext = context; 157 if (!adapter.getProfileProxy(mContext, mServiceConnection, BluetoothProfile.INPUT_DEVICE)) {
|
/packages/apps/UnifiedEmail/src/com/android/mail/ |
H A D | FormattedDateBuilder.java | 34 private final Context mContext; field in class:FormattedDateBuilder 37 mContext = context; 78 return getRelativeDateTimeString(mContext, when, DateUtils.DAY_IN_MILLIS, 96 DateUtils.formatDateRange(mContext, dateFormatter, when, when, 110 return mContext.getString(R.string.date_message_received_print, 125 DateUtils.formatDateRange(mContext, dateFormatter, when, when, flags);
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
H A D | TelecomBroadcastIntentProcessor.java | 69 private final Context mContext; field in class:TelecomBroadcastIntentProcessor 73 mContext = context; 95 closeSystemDialogs(mContext); 100 mContext.startActivityAsUser(callIntent, userHandle); 105 closeSystemDialogs(mContext); 111 mContext.startActivityAsUser(callIntent, userHandle);
|
/packages/apps/TV/src/com/android/tv/data/epg/ |
H A D | EpgFetcher.java | 106 private final Context mContext; field in class:EpgFetcher 136 mContext = context.getApplicationContext(); 137 ApplicationSingletons applicationSingletons = TvApplication.getSingletons(mContext); 140 mEpgReader = createEpgReader(mContext, LocationUtils.getCurrentCountry(mContext)); 161 (JobScheduler) mContext.getSystemService(Context.JOB_SCHEDULER_SERVICE); 170 new ComponentName(mContext, EpgFetchService.class)) 192 return EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext); 197 if (System.currentTimeMillis() - EpgFetchHelper.getLastEpgUpdatedTimestamp(mContext) 235 if (mScanStarted || !Features.ENABLE_CLOUD_EPG_REGION.isEnabled(mContext)) { [all...] |
/packages/apps/Dialer/java/com/android/contacts/common/preference/ |
H A D | ContactsPreferences.java | 59 private final Context mContext; field in class:ContactsPreferences 70 mContext = context; 72 mPreferences = mContext.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE); 74 mContext.getResources().getString(R.string.contact_editor_default_account_key); 76 mContext.getResources().getString(R.string.contact_editor_anything_saved_key); 81 return mContext.getResources().getBoolean(R.bool.config_sort_order_user_changeable); 85 if (mContext.getResources().getBoolean(R.bool.config_default_sort_order_primary)) { 110 return mContext.getResources().getBoolean(R.bool.config_display_order_user_changeable); 114 if (mContext.getResources().getBoolean(R.bool.config_default_display_order_primary)) { 139 return mContext [all...] |
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/util/ |
H A D | PreferenceUtilsTest.java | 62 @Mock Context mContext; field in class:PreferenceUtilsTest 72 when(mContext.getContentResolver()).thenReturn(mContentResolver); 73 when(mContext.getPackageManager()).thenReturn(mPackageManager); 74 when(mContext.getPackageName()).thenReturn(PACKAGE_NAME); 75 when(mContext.getSharedPreferences(anyString(), anyInt())).thenReturn(mSharedPreferences); 85 assertThat(PreferenceUtils.hasAtLeastOnePreferenceSet(mContext)).isFalse(); 92 assertThat(PreferenceUtils.hasAtLeastOnePreferenceSet(mContext)).isTrue(); 100 assertThat(PreferenceUtils.hasAtLeastOneEmergencyContact(mContext)).isFalse(); 113 assertThat(PreferenceUtils.hasAtLeastOneEmergencyContact(mContext)).isTrue(); 118 PreferenceUtils.enableSettingsSuggestion(mContext); [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/graphics/ |
H A D | IconShapeOverride.java | 152 private final Context mContext; field in class:IconShapeOverride.PreferenceChangeHandler 155 mContext = context; 161 if (!getAppliedValue(mContext).equals(newValue)) { 163 ProgressDialog.show(mContext, 165 mContext.getString(R.string.icon_shape_override_progress), 169 new OverrideApplyHandler(mContext, newValue)); 177 private final Context mContext; field in class:IconShapeOverride.OverrideApplyHandler 181 mContext = context; 188 getDevicePrefs(mContext).edit().putString(KEY_PREFERENCE, mValue).commit(); 190 LauncherAppState.getInstance(mContext) [all...] |
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
H A D | BluetoothEnabler.java | 47 private Context mContext; field in class:BluetoothEnabler 77 mContext = context; 105 if (mContext != context) { 106 mContext = context; 122 mContext.registerReceiver(mReceiver, mIntentFilter); 132 mContext.unregisterReceiver(mReceiver); 183 !WirelessUtils.isRadioAllowed(mContext, Settings.Global.RADIO_BLUETOOTH)) { 184 Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show(); 190 mMetricsFeatureProvider.action(mContext, mMetricsEvent, isChecked); 215 EnforcedAdmin admin = getEnforcedAdmin(mRestrictionUtils, mContext); 227 getEnforcedAdmin(RestrictionUtils mRestrictionUtils, Context mContext) argument [all...] |
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
H A D | BluetoothOppTransferAdapter.java | 58 private Context mContext; field in class:BluetoothOppTransferAdapter 62 mContext = context; 88 title = mContext.getString(R.string.unknown_file); 107 tv.setText(BluetoothOppUtility.getStatusDescription(mContext, status, deviceName)); 112 mContext, totalBytes)); 115 mContext, totalBytes)); 123 CharSequence str = DateUtils.isToday(time) ? DateFormat.getTimeFormat(mContext).format( 124 d) : DateFormat.getDateFormat(mContext).format(d);
|
/packages/apps/CellBroadcastReceiver/tests/testapp/src/com/android/cellbroadcastreceiver/ |
H A D | DialogSmsDisplayTests.java | 73 private Context mContext; field in class:DialogSmsDisplayTests 83 mContext = getActivity(); 125 return GsmSmsCbMessage.createSmsCbMessage(mContext, new SmsCbHeader(pdus[0]), 137 mContext.sendOrderedBroadcast(intent, "android.permission.RECEIVE_SMS"); 145 mContext.sendOrderedBroadcast(intent, "android.permission.RECEIVE_SMS"); 152 mContext.sendOrderedBroadcast(intent, 160 mContext.sendOrderedBroadcast(intent, 168 mContext.sendOrderedBroadcast(intent,
|
/packages/apps/Dialer/java/com/android/dialer/app/contactinfo/ |
H A D | ContactPhotoLoader.java | 46 private final Context mContext; field in class:ContactPhotoLoader 50 mContext = Objects.requireNonNull(context); 65 int photoSize = mContext.getResources().getDimensionPixelSize(R.dimen.contact_photo_size); 88 InputStream input = mContext.getContentResolver().openInputStream(mContactInfo.photoUri); 105 RoundedBitmapDrawableFactory.create(mContext.getResources(), bitmap); 118 new ContactInfoHelper(mContext, GeoUtil.getCurrentCountryIso(mContext)); 119 LetterTileDrawable drawable = new LetterTileDrawable(mContext.getResources());
|
/packages/apps/Dialer/java/com/android/voicemail/impl/ |
H A D | SubscriptionInfoHelper.java | 39 private static Context mContext; field in class:SubscriptionInfoHelper 46 mContext = context;
|
/packages/apps/Launcher3/src/com/android/launcher3/accessibility/ |
H A D | FolderAccessibilityHelper.java | 49 return mContext.getString(R.string.move_to_position, id + mStartPosition + 1); 54 return mContext.getString(R.string.item_moved);
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/ |
H A D | DpcReceivedSuccessReceiverTest.java | 54 @Mock private Context mContext; field in class:DpcReceivedSuccessReceiverTest 71 receiver.onReceive(mContext, TEST_INTENT); 75 verify(mContext).sendBroadcast(intentCaptor.capture()); 99 verify(mUtils).removeAccount(mContext, TEST_ACCOUNT); 113 verify(mUtils, never()).removeAccount(mContext, TEST_ACCOUNT); 123 }).when(mContext).sendBroadcast(any(Intent.class)); 126 receiver.onReceive(mContext, TEST_INTENT); 132 verify(mContext).sendBroadcast(intentCaptor.capture());
|
/packages/apps/Settings/src/com/android/settings/applications/ |
H A D | SpecialAppAccessPreferenceController.java | 47 mDataSaverBackend = new DataSaverBackend(mContext); 50 preference.setSummary(mContext.getResources().getQuantityString(
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
H A D | BasebandVersionPreferenceController.java | 39 return !Utils.isWifiOnly(mContext); 51 mContext.getResources().getString(R.string.device_info_default)));
|
/packages/apps/Settings/src/com/android/settings/display/ |
H A D | ScreenSaverPreferenceController.java | 34 return mContext.getResources().getBoolean( 45 preference.setSummary(DreamSettings.getSummaryTextWithDreamName(mContext));
|