Home
last modified time | relevance | path

Searched refs:mContext (Results 1 – 25 of 2859) sorted by relevance

12345678910>>...115

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceControllerTest.java79 private Context mContext; field in KeyboardManagementPreferenceControllerTest
84 mContext = RuntimeEnvironment.application; in setUp()
86 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp()
87 mControllerHelper = new PreferenceControllerTestHelper<>(mContext, in setUp()
89 mInputMethodManager = (InputMethodManager) mContext.getSystemService(Context in setUp()
96 getShadowInputMethodManager(mContext).setInputMethodList(new ArrayList<>()); in setUp()
103 getShadowDevicePolicyManager(mContext).setPermittedInputMethodsForCurrentUser(null); in refreshUi_permitAllInputMethods_preferenceCountIs4()
108 getShadowInputMethodManager(mContext).setInputMethodList(infos); in refreshUi_permitAllInputMethods_preferenceCountIs4()
109 getShadowInputMethodManager(mContext).setEnabledInputMethodList(infos); in refreshUi_permitAllInputMethods_preferenceCountIs4()
118 getShadowDevicePolicyManager(mContext).setPermittedInputMethodsForCurrentUser( in refreshUi_multiplteAllowedImeByOrganization_allPreferencesVisible()
[all …]
DEnabledKeyboardPreferenceControllerTest.java68 private Context mContext; field in EnabledKeyboardPreferenceControllerTest
73 mContext = RuntimeEnvironment.application; in setUp()
75 mPreferenceGroup = new LogicalPreferenceGroup(mContext); in setUp()
76 mControllerHelper = new PreferenceControllerTestHelper<>(mContext, in setUp()
87 getShadowInputMethodManager(mContext).reset(); in tearDown()
88 getShadowDevicePolicyManager(mContext).reset(); in tearDown()
93 getShadowDevicePolicyManager(mContext).setPermittedInputMethodsForCurrentUser(null); in refreshUi_permitAllInputMethods()
95 getShadowInputMethodManager(mContext).setEnabledInputMethodList(infos); in refreshUi_permitAllInputMethods()
104 getShadowDevicePolicyManager(mContext).setPermittedInputMethodsForCurrentUser( in refreshUi_hasAllowedImeByOrganization()
107 getShadowInputMethodManager(mContext).setEnabledInputMethodList(infos); in refreshUi_hasAllowedImeByOrganization()
[all …]
/packages/apps/Car/Cluster/src/android/car/cluster/
DNavStateController.java54 private Context mContext; field in NavStateController
73 mContext = container.getContext(); in NavStateController()
122 return mContext.getColor(R.color.low_traffic); in getTrafficColor()
124 return mContext.getColor(R.color.medium_traffic); in getTrafficColor()
126 return mContext.getColor(R.color.high_traffic); in getTrafficColor()
129 return mContext.getColor(R.color.unknown_traffic); in getTrafficColor()
188 return mContext.getDrawable(R.drawable.direction_depart); in getManeuverIcon()
190 return mContext.getDrawable(R.drawable.direction_new_name_straight); in getManeuverIcon()
192 return mContext.getDrawable(R.drawable.direction_continue_left); in getManeuverIcon()
194 return mContext.getDrawable(R.drawable.direction_continue_right); in getManeuverIcon()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DZenModeSettings.java99 private Context mContext; field in ZenModeSettings.SummaryBuilder
102 mContext = context; in SummaryBuilder()
124 return mContext.getString(R.string.zen_sound_all_muted); in getSoundSettingSummary()
126 return mContext.getString(R.string.zen_sound_one_allowed, in getSoundSettingSummary()
129 return mContext.getString(R.string.zen_sound_two_allowed, in getSoundSettingSummary()
133 return mContext.getString(R.string.zen_sound_three_allowed, in getSoundSettingSummary()
138 return mContext.getString(R.string.zen_sound_none_muted); in getSoundSettingSummary()
148 return mContext.getString(R.string.zen_mode_from_none_calls); in getCallsSettingSummary()
150 return mContext.getString(R.string.zen_mode_calls_summary_one, in getCallsSettingSummary()
153 return mContext.getString(R.string.zen_mode_calls_summary_two, in getCallsSettingSummary()
[all …]
/packages/apps/Settings/src/com/android/settings/notification/
DZenModeSettings.java99 private Context mContext; field in ZenModeSettings.SummaryBuilder
102 mContext = context; in SummaryBuilder()
124 return mContext.getString(R.string.zen_sound_all_muted); in getSoundSettingSummary()
126 return mContext.getString(R.string.zen_sound_one_allowed, in getSoundSettingSummary()
129 return mContext.getString(R.string.zen_sound_two_allowed, in getSoundSettingSummary()
133 return mContext.getString(R.string.zen_sound_three_allowed, in getSoundSettingSummary()
138 return mContext.getString(R.string.zen_sound_none_muted); in getSoundSettingSummary()
148 return mContext.getString(R.string.zen_mode_from_none_calls); in getCallsSettingSummary()
150 return mContext.getString(R.string.zen_mode_calls_summary_one, in getCallsSettingSummary()
153 return mContext.getString(R.string.zen_mode_calls_summary_two, in getCallsSettingSummary()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DShowOnLockscreenNotificationPreferenceControllerTest.java54 private Context mContext; field in ShowOnLockscreenNotificationPreferenceControllerTest
68 mContext = RuntimeEnvironment.application; in setUp()
69 mController = new ShowOnLockScreenNotificationPreferenceController(mContext, KEY); in setUp()
71 mContext, Robolectric.buildAttributeSet().build()); in setUp()
84 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_noNotifsOnLockscreen()
88 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_noNotifsOnLockscreen()
98 .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_none)); in updateState_noNotifsOnLockscreen()
103 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_alertingNotifsOnLockscreen()
106 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_alertingNotifsOnLockscreen()
115 .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); in updateState_alertingNotifsOnLockscreen()
[all …]
DRedactNotificationPreferenceControllerTest.java77 private Context mContext; field in RedactNotificationPreferenceControllerTest
86 mContext = RuntimeEnvironment.application; in setUp()
91 when(mMockContext.getContentResolver()).thenReturn(mContext.getContentResolver()); in setUp()
99 mPreference = new Preference(mContext); in setUp()
106 mWorkPreference = new Preference(mContext); in setUp()
115 Settings.Secure.putIntForUser(mContext.getContentResolver(), in getAvailabilityStatus_noSecureLockscreen()
118 Settings.Secure.putIntForUser(mContext.getContentResolver(), in getAvailabilityStatus_noSecureLockscreen()
137 Settings.Secure.putIntForUser(mContext.getContentResolver(), in getAvailabilityStatus_noWorkProfile()
152 Settings.Secure.putIntForUser(mContext.getContentResolver(), in getAvailabilityStatus_adminSaysNoRedaction()
155 Settings.Secure.putIntForUser(mContext.getContentResolver(), in getAvailabilityStatus_adminSaysNoRedaction()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DSliceBuilderUtilsTest.java78 private Context mContext; field in SliceBuilderUtilsTest
83 mContext = RuntimeEnvironment.application; in setUp()
92 final Slice slice = SliceBuilderUtils.buildSlice(mContext, sliceData); in buildIntentSlice_returnsMatchingSlice()
94 SliceTester.testSettingsIntentSlice(mContext, slice, sliceData); in buildIntentSlice_returnsMatchingSlice()
101 final Slice slice = SliceBuilderUtils.buildSlice(mContext, dummyData); in buildToggleSlice_returnsMatchingSlice()
108 SliceTester.testSettingsToggleSlice(mContext, slice, dummyData); in buildToggleSlice_returnsMatchingSlice()
115 final Slice slice = SliceBuilderUtils.buildSlice(mContext, data); in buildSliderSlice_returnsMatchingSlice()
122 SliceTester.testSettingsSliderSlice(mContext, slice, data); in buildSliderSlice_returnsMatchingSlice()
129 final Slice slice = SliceBuilderUtils.buildSlice(mContext, dummyData); in buildCopyableSlice_returnsMatchingSlice()
136 SliceTester.testSettingsCopyableSlice(mContext, slice, dummyData); in buildCopyableSlice_returnsMatchingSlice()
[all …]
DSliceBroadcastReceiverTest.java67 private Context mContext; field in SliceBroadcastReceiverTest
75 mContext = spy(RuntimeEnvironment.application); in setUp()
76 mDb = SlicesDatabaseHelper.getInstance(mContext).getWritableDatabase(); in setUp()
78 SlicesDatabaseHelper helper = SlicesDatabaseHelper.getInstance(mContext); in setUp()
87 DatabaseTestUtils.clearDb(mContext); in cleanUp()
102 doReturn(resolver).when(mContext).getContentResolver(); in onReceive_toggleChanged()
104 FakeToggleController fakeToggleController = new FakeToggleController(mContext, key); in onReceive_toggleChanged()
112 mReceiver.onReceive(mContext, intent); in onReceive_toggleChanged()
127 final ContentResolver resolver = spy(mContext.getContentResolver()); in toggleUpdate_synchronously_notifyChange_should_be_called()
128 doReturn(resolver).when(mContext).getContentResolver(); in toggleUpdate_synchronously_notifyChange_should_be_called()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiWakeupPreferenceControllerTest.java50 private Context mContext; field in WifiWakeupPreferenceControllerTest
64 mContext = RuntimeEnvironment.application; in setUp()
65 mController = new WifiWakeupPreferenceController(mContext, mFragment, mLifecycle); in setUp()
69 Settings.Global.putInt(mContext.getContentResolver(), WIFI_SCAN_ALWAYS_AVAILABLE, 1); in setUp()
75 final SwitchPreference pref = new SwitchPreference(mContext); in handlePreferenceTreeClick_nonMatchingKey_shouldDoNothing()
82 final Preference pref = new Preference(mContext); in handlePreferenceTreeClick_nonMatchingType_shouldDoNothing()
90 final SwitchPreference pref = new SwitchPreference(mContext); in handlePreferenceTreeClick_matchingKeyAndType_shouldUpdateSetting()
95 assertThat(Settings.Global.getInt(mContext.getContentResolver(), WIFI_WAKEUP_ENABLED, 0)) in handlePreferenceTreeClick_matchingKeyAndType_shouldUpdateSetting()
101 Settings.Global.putInt(mContext.getContentResolver(), WIFI_WAKEUP_ENABLED, 1); in handlePreferenceTreeClick_wifiWakeupEnableScanningDisable_wifiWakeupEnable()
102 Settings.Global.putInt(mContext.getContentResolver(), WIFI_SCAN_ALWAYS_AVAILABLE, 0); in handlePreferenceTreeClick_wifiWakeupEnableScanningDisable_wifiWakeupEnable()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/
DMobileNetworkUtilsTest.java83 private Context mContext; field in MobileNetworkUtilsTest
90 mContext = spy(RuntimeEnvironment.application); in setUp()
91 when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager); in setUp()
92 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp()
95 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
98 when(mContext.getSystemService(CarrierConfigManager.class)).thenReturn( in setUp()
113 MobileNetworkUtils.setMobileDataEnabled(mContext, SUB_ID_1, true, false); in setMobileDataEnabled_setEnabled_enabled()
121 MobileNetworkUtils.setMobileDataEnabled(mContext, SUB_ID_2, true, false); in setMobileDataEnabled_setDisabled_disabled()
129 MobileNetworkUtils.setMobileDataEnabled(mContext, SUB_ID_1, true, true); in setMobileDataEnabled_disableOtherSubscriptions()
137 assertThat(MobileNetworkUtils.buildPhoneAccountConfigureIntent(mContext, null)).isNull(); in buildConfigureIntent_nullHandle_returnNull()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/wifi/preferences/
DWifiWakeupTogglePreferenceControllerTest.java56 private Context mContext; field in WifiWakeupTogglePreferenceControllerTest
65 mContext = RuntimeEnvironment.application; in setUp()
66 mLocationManager = (LocationManager) mContext.getSystemService(Service.LOCATION_SERVICE); in setUp()
67 mTwoStatePreference = new SwitchPreference(mContext); in setUp()
68 mControllerHelper = new PreferenceControllerTestHelper<>(mContext, in setUp()
93 Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.WIFI_WAKEUP_ENABLED, in handlePreferenceClicked_wifiWakeupEnabled_disablesWifiWakeup()
98 assertThat(Settings.Global.getInt(mContext.getContentResolver(), in handlePreferenceClicked_wifiWakeupEnabled_disablesWifiWakeup()
106 Settings.Global.putInt(mContext.getContentResolver(), in handlePreferenceClicked_wifiScanningDisabled_showsDialog()
108 Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.WIFI_WAKEUP_ENABLED, in handlePreferenceClicked_wifiScanningDisabled_showsDialog()
121 Settings.Global.putInt(mContext.getContentResolver(), in handlePreferenceClicked_wifiScanningEnabled_wifiWakeupDisabled_enablesWifiWakeup()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/controller/
DShortcutController.java52 private final Context mContext; field in ShortcutController
58 mContext = context; in ShortcutController()
59 mComponentName = new ComponentName(mContext, DeskClock.class); in ShortcutController()
60 mShortcutManager = mContext.getSystemService(ShortcutManager.class); in ShortcutController()
61 mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); in ShortcutController()
62 Controller.getController().addEventTracker(new ShortcutEventTracker(mContext)); in ShortcutController()
85 .setClass(mContext, HandleApiCalls.class) in createNewAlarmShortcut()
90 return new ShortcutInfo.Builder(mContext, setAlarmShortcut) in createNewAlarmShortcut()
91 .setIcon(Icon.createWithResource(mContext, R.drawable.shortcut_new_alarm)) in createNewAlarmShortcut()
93 .setShortLabel(mContext.getString(R.string.shortcut_new_alarm_short)) in createNewAlarmShortcut()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppNotification.java102 private Context mContext; field in BluetoothOppNotification
149 mContext = ctx; in BluetoothOppNotification()
151 (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); in BluetoothOppNotification()
153 mContext.getString(R.string.opp_notification_group), in BluetoothOppNotification()
159 mContentResolver = mContext.getContentResolver(); in BluetoothOppNotification()
290 fileName = mContext.getString(R.string.unknown_file); in updateActiveNotification()
305 item.description = mContext.getString(R.string.notification_sending, fileName); in updateActiveNotification()
308 mContext.getString(R.string.notification_receiving, fileName); in updateActiveNotification()
351 mContext.sendBroadcast(intent, Constants.HANDOVER_STATUS_PERMISSION); in updateActiveNotification()
356 Notification.Builder b = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL); in updateActiveNotification()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DSystemNavigationGestureSettingsTest.java70 private Context mContext; field in SystemNavigationGestureSettingsTest
84 mContext = RuntimeEnvironment.application; in setUp()
106 assertEquals(KEY_SYSTEM_NAV_GESTURAL, mSettings.getCurrentSystemNavigationMode(mContext)); in testGetCurrentSystemNavigationMode()
110 assertEquals(KEY_SYSTEM_NAV_3BUTTONS, mSettings.getCurrentSystemNavigationMode(mContext)); in testGetCurrentSystemNavigationMode()
114 assertEquals(KEY_SYSTEM_NAV_2BUTTONS, mSettings.getCurrentSystemNavigationMode(mContext)); in testGetCurrentSystemNavigationMode()
119 mSettings.setBackSensitivity(mContext, mOverlayManager, 0); in testSetCurrentSystemNavigationMode()
120 mSettings.setCurrentSystemNavigationMode(mContext, mOverlayManager, in testSetCurrentSystemNavigationMode()
125 mSettings.setBackSensitivity(mContext, mOverlayManager, 1); in testSetCurrentSystemNavigationMode()
126 mSettings.setCurrentSystemNavigationMode(mContext, mOverlayManager, in testSetCurrentSystemNavigationMode()
131 mSettings.setBackSensitivity(mContext, mOverlayManager, 2); in testSetCurrentSystemNavigationMode()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/slice/
DWifiSlice.java81 protected final Context mContext; field in WifiSlice
86 mContext = context; in WifiSlice()
87 mWifiManager = mContext.getSystemService(WifiManager.class); in WifiSlice()
88 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in WifiSlice()
99 mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */); in getSlice()
127 final CharSequence placeholder = mContext.getText(R.string.summary_placeholder); in getSlice()
148 final IconCompat icon = IconCompat.createWithResource(mContext, in getListBuilder()
150 final String title = mContext.getString(R.string.wifi_settings); in getListBuilder()
152 final PendingIntent toggleAction = getBroadcastIntent(mContext); in getListBuilder()
159 return new ListBuilder(mContext, getUri(), ListBuilder.INFINITY) in getListBuilder()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DTopLevelSecurityPreferenceControllerTest.java41 private Context mContext; field in TopLevelSecurityPreferenceControllerTest
51 when(mContext.getSystemService(Context.FINGERPRINT_SERVICE)) in setUp()
53 when(mContext.getSystemService(Context.FACE_SERVICE)) in setUp()
55 mController = new TopLevelSecurityEntryPreferenceController(mContext, "test_key"); in setUp()
60 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) in geSummary_hasFace_hasStaticSummary()
66 verify(mContext).getText(R.string.security_dashboard_summary_face); in geSummary_hasFace_hasStaticSummary()
71 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) in geSummary_hasFingerPrint_hasStaticSummary()
73 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) in geSummary_hasFingerPrint_hasStaticSummary()
79 verify(mContext).getText(R.string.security_dashboard_summary); in geSummary_hasFingerPrint_hasStaticSummary()
84 when(mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) in geSummary_noFpFeature_shouldSetSummaryWithNoBiometrics()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/
DStorageItemPreferenceControllerTest.java73 private Context mContext; field in StorageItemPreferenceControllerTest
96 mContext = spy(RuntimeEnvironment.application.getApplicationContext()); in setUp()
102 mController = new StorageItemPreferenceController(mContext, mFragment, mVolume, mSvp); in setUp()
103 mPreference = new StorageItemPreference(mContext); in setUp()
106 final LayoutInflater inflater = LayoutInflater.from(mContext); in setUp()
107 inflater.inflate(mPreference.getLayoutResource(), new LinearLayout(mContext), false); in setUp()
113 .isEqualTo(mContext.getString(R.string.memory_calculating_size)); in testUpdateStateWithInitialState()
181 mController = new StorageItemPreferenceController(mContext, mFragment, mVolume, mSvp, true); in testClickAppsForWork()
281 final StorageItemPreference audio = new StorageItemPreference(mContext); in testMeasurementCompletedUpdatesPreferences()
282 final StorageItemPreference image = new StorageItemPreference(mContext); in testMeasurementCompletedUpdatesPreferences()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/development/
DDevelopmentSettingsUtilTest.java44 private Context mContext; field in DevelopmentSettingsUtilTest
52 mContext = RuntimeEnvironment.application; in setUp()
65 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOff_isAdmin_notDemo_shouldReturnFalse()
68 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, in isEnabled_settingsOff_isAdmin_notDemo_shouldReturnFalse()
74 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_isAdmin_notDemo_shouldReturnTrue()
77 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, in isEnabled_settingsOn_isAdmin_notDemo_shouldReturnTrue()
83 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_notAdmin_notDemo_shouldReturnFalse()
88 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, in isEnabled_settingsOn_notAdmin_notDemo_shouldReturnFalse()
94 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_notAdmin_isDemo_shouldReturnTrue()
99 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, in isEnabled_settingsOn_notAdmin_isDemo_shouldReturnTrue()
[all …]
/packages/apps/Settings/src/com/android/settings/wifi/calling/
DWifiCallingSliceHelper.java111 private final Context mContext; field in WifiCallingSliceHelper
115 mContext = context; in WifiCallingSliceHelper()
158 mContext.getText(R.string.wifi_calling_settings_title), in createWifiCallingSlice()
159 mContext.getText( in createWifiCallingSlice()
190 final IconCompat icon = IconCompat.createWithResource(mContext, R.drawable.wifi_signal); in getWifiCallingSlice()
192 return new ListBuilder(mContext, sliceUri, ListBuilder.INFINITY) in getWifiCallingSlice()
193 .setAccentColor(Utils.getColorAccentDefaultColor(mContext)) in getWifiCallingSlice()
195 .setTitle(mContext.getText(R.string.wifi_calling_settings_title)) in getWifiCallingSlice()
204 mContext.getText(R.string.wifi_calling_settings_title)))) in getWifiCallingSlice()
260 mContext.getText(R.string.wifi_calling_mode_title), in createWifiCallingPreferenceSlice()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/calling/
DWifiCallingSliceHelper.java111 private final Context mContext; field in WifiCallingSliceHelper
115 mContext = context; in WifiCallingSliceHelper()
158 mContext.getText(R.string.wifi_calling_settings_title), in createWifiCallingSlice()
159 mContext.getText( in createWifiCallingSlice()
190 final IconCompat icon = IconCompat.createWithResource(mContext, R.drawable.wifi_signal); in getWifiCallingSlice()
192 return new ListBuilder(mContext, sliceUri, ListBuilder.INFINITY) in getWifiCallingSlice()
193 .setAccentColor(Utils.getColorAccentDefaultColor(mContext)) in getWifiCallingSlice()
195 .setTitle(mContext.getText(R.string.wifi_calling_settings_title)) in getWifiCallingSlice()
204 mContext.getText(R.string.wifi_calling_settings_title)))) in getWifiCallingSlice()
260 mContext.getText(R.string.wifi_calling_mode_title), in createWifiCallingPreferenceSlice()
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/
DNotificationFragment.java43 private Context mContext; field in NotificationFragment
50 mContext = getActivity(); in onCreate()
52 (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); in onCreate()
103 Intent intent = new Intent(mContext, KitchenSinkActivity.class).setAction(action); in createServiceIntent()
105 return PendingIntent.getForegroundService(mContext, notificationId, intent, in createServiceIntent()
122 .Builder(mContext, IMPORTANCE_HIGH_ID) in initCarCategoriesButton()
134 .Builder(mContext, IMPORTANCE_HIGH_ID) in initCarCategoriesButton()
140 .setColor(mContext.getColor(android.R.color.holo_orange_dark)) in initCarCategoriesButton()
149 .Builder(mContext, IMPORTANCE_DEFAULT_ID) in initCarCategoriesButton()
153 .setColor(mContext.getColor(android.R.color.holo_orange_light)) in initCarCategoriesButton()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/
DNfcPreferenceControllerTest.java65 private Context mContext; field in NfcPreferenceControllerTest
72 mContext = spy(RuntimeEnvironment.application); in setUp()
74 when(mContext.getApplicationContext()).thenReturn(mContext); in setUp()
75 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp()
76 when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mManager); in setUp()
77 when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter); in setUp()
79 mNfcController = new NfcPreferenceController(mContext, in setUp()
189 Settings.Global.putString(mContext.getContentResolver(), in isToggleableInAirplaneMode_containNfc_shouldReturnTrue()
192 Settings.Global.putInt(mContext.getContentResolver(), in isToggleableInAirplaneMode_containNfc_shouldReturnTrue()
195 assertThat(NfcPreferenceController.isToggleableInAirplaneMode(mContext)).isTrue(); in isToggleableInAirplaneMode_containNfc_shouldReturnTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/backup/
DBackupSettingsHelperTest.java68 private Context mContext; field in BackupSettingsHelperTest
80 mContext = spy(RuntimeEnvironment.application.getApplicationContext()); in setUp()
82 mBackupSettingsHelper = new BackupSettingsHelper(mContext); in setUp()
83 mUserManager = Shadow.extract(mContext.getSystemService(Context.USER_SERVICE)); in setUp()
93 assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_on)); in testGetSummary_backupEnabledOnlyOneProfile_showsOn()
103 assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_off)); in testGetSummary_backupDisabledOnlyOneProfile_showsOff()
214 when(mContext.getPackageManager()).thenReturn(packageManager); in testIsIntentProvidedByTransport_WithInvalidIntent()
229 when(mContext.getPackageManager()).thenReturn(packageManager); in testIsIntentProvidedByTransport_WithIntent()
285 when(mContext.getPackageManager()).thenReturn(packageManager); in testGetIntentForBackupSettings_WithIntentFromTransport()
312 assertThat(backupLabel).isEqualTo(mContext.getString(DEFAULT_LABEL_RESOURCE)); in testGetLabelForBackupSettings_WithEmptyLabelFromTransport()
[all …]
/packages/apps/Settings/src/com/android/settings/wifi/slice/
DWifiSlice.java74 protected final Context mContext; field in WifiSlice
79 mContext = context; in WifiSlice()
80 mWifiManager = mContext.getSystemService(WifiManager.class); in WifiSlice()
81 mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); in WifiSlice()
92 mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */); in getSlice()
121 final CharSequence placeholder = mContext.getText(R.string.summary_placeholder); in getSlice()
149 final IconCompat icon = IconCompat.createWithResource(mContext, in getHeaderRow()
151 final String title = mContext.getString(R.string.wifi_settings); in getHeaderRow()
152 final PendingIntent toggleAction = getBroadcastIntent(mContext); in getHeaderRow()
159 return new ListBuilder(mContext, getUri(), ListBuilder.INFINITY) in getHeaderRow()
[all …]

12345678910>>...115