/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/ |
D | NavStateController.java | 65 private Context mContext; field in NavStateController 89 mContext = container.getContext(); in NavStateController() 180 mContext.getResources().getValue(alphaId, typedValue, true); in getAlphaFromResource() 186 return mContext.getColor(R.color.low_traffic); in getTrafficColor() 188 return mContext.getColor(R.color.medium_traffic); in getTrafficColor() 190 return mContext.getColor(R.color.high_traffic); in getTrafficColor() 193 return mContext.getColor(R.color.unknown_traffic); in getTrafficColor() 252 return mContext.getDrawable(R.drawable.direction_depart); in getManeuverIcon() 254 return mContext.getDrawable(R.drawable.direction_new_name_straight); in getManeuverIcon() 256 return mContext.getDrawable(R.drawable.direction_continue_left); in getManeuverIcon() [all …]
|
/packages/apps/Car/Cluster/ClusterOsDouble/src/com/android/car/cluster/view/ |
D | NavStateController.java | 66 private final Context mContext; field in NavStateController 90 mContext = container.getContext(); in NavStateController() 178 mContext.getResources().getValue(alphaId, typedValue, true); in getAlphaFromResource() 184 return mContext.getColor(R.color.low_traffic); in getTrafficColor() 186 return mContext.getColor(R.color.medium_traffic); in getTrafficColor() 188 return mContext.getColor(R.color.high_traffic); in getTrafficColor() 191 return mContext.getColor(R.color.unknown_traffic); in getTrafficColor() 250 return mContext.getDrawable(R.drawable.direction_depart); in getManeuverIcon() 252 return mContext.getDrawable(R.drawable.direction_new_name_straight); in getManeuverIcon() 254 return mContext.getDrawable(R.drawable.direction_continue_left); in getManeuverIcon() [all …]
|
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/ |
D | CellBroadcastReceiverTest.java | 123 doReturn(mContext).when(mContext).getApplicationContext(); in setUp() 124 doReturn(mPackageName).when(mContext).getPackageName(); in setUp() 125 doReturn(mFakeSharedPreferences).when(mContext).getSharedPreferences(anyString(), anyInt()); in setUp() 126 doReturn(mUserManager).when(mContext).getSystemService(Context.USER_SERVICE); in setUp() 135 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionCarrierConfigChanged() 146 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionCarrierConfigChangedOnRebroadcast() 154 doReturn(mContentResolver).when(mContext).getContentResolver(); in testOnReceive_actionBootCompleted() 158 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionBootCompleted() 164 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_cellbroadcastStartConfigAction() 173 doReturn(mUserManager).when(mContext).getSystemService(anyString()); in testOnReceive_actionDefaultSmsSubscriptionChanged() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiInjector.java | 133 private final WifiContext mContext; field in WifiInjector 258 mContext = context; in WifiInjector() 259 mWifiNotificationManager = new WifiNotificationManager(mContext); in WifiInjector() 260 mWifiGlobals = new WifiGlobals(mContext); in WifiInjector() 261 mScoringParams = new ScoringParams(mContext); in WifiInjector() 262 mWifiChannelUtilizationScan = new WifiChannelUtilization(mClock, mContext); in WifiInjector() 263 mSettingsMigrationDataHolder = new SettingsMigrationDataHolder(mContext); in WifiInjector() 265 mContext, mFrameworkFacade); in WifiInjector() 267 mWifiPermissionsWrapper = new WifiPermissionsWrapper(mContext); in WifiInjector() 268 mNetworkScoreManager = mContext.getSystemService(NetworkScoreManager.class); in WifiInjector() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ShowOnLockscreenNotificationPreferenceControllerTest.java | 54 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 …]
|
/packages/apps/QuickAccessWallet/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/ |
D | QuickAccessWalletClientTest.java | 66 private final Context mContext = ApplicationProvider.getApplicationContext(); field in QuickAccessWalletClientTest 77 setDefaultPaymentApp(mContext.getPackageName()); in isWalletServiceAvailable_serviceAvailable_returnsTrue() 80 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_serviceAvailable_returnsTrue() 87 setDefaultPaymentApp(mContext.getPackageName()); in isWalletServiceAvailable_returnsFalseIfServiceUnavailable() 89 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_returnsFalseIfServiceUnavailable() 99 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_returnsFalseIfNfcPaymentAppIsAnotherApp() 106 setDefaultPaymentApp(mContext.getPackageName()); in isWalletFeatureAvailable_happyCase() 108 WalletPluginService.updateSettingsFeatureAvailability(mContext, true); in isWalletFeatureAvailable_happyCase() 109 ContentResolver cr = mContext.getContentResolver(); in isWalletFeatureAvailable_happyCase() 112 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletFeatureAvailable_happyCase() [all …]
|
D | WalletPluginServiceTest.java | 32 private final Context mContext = ApplicationProvider.getApplicationContext(); field in WalletPluginServiceTest 47 mPluginService.onCreate(mContext, mContext, mWalletClient); in onCreate_serviceAvailable_enablesFeatureInSettings() 49 ContentResolver cr = mContext.getContentResolver(); in onCreate_serviceAvailable_enablesFeatureInSettings() 60 mPluginService.onCreate(mContext, mContext, mWalletClient); in onCreate_serviceUnavailable_disablesFeatureInSettings() 62 ContentResolver cr = mContext.getContentResolver(); in onCreate_serviceUnavailable_disablesFeatureInSettings() 71 ContentResolver cr = mContext.getContentResolver(); in onCreate_doesNotOverridePanelEnabledSettingIfOff() 74 mPluginService.onCreate(mContext, mContext, mWalletClient); in onCreate_doesNotOverridePanelEnabledSettingIfOff() 83 mPluginService.onCreate(mContext, mContext, mWalletClient); in onPanelShown_wasUnavailable_nowAvailable_updatesFeatureAvailabilityInSettings() 84 ContentResolver cr = mContext.getContentResolver(); in onPanelShown_wasUnavailable_nowAvailable_updatesFeatureAvailabilityInSettings() 102 mPluginService.onCreate(mContext, mContext, mWalletClient); in onPanelShown_wasAvailable_nowUnavailable_updatesFeatureAvailabilityInSettings() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/ |
D | SliceBuilderUtilsTest.java | 77 private Context mContext; field in SliceBuilderUtilsTest 82 mContext = RuntimeEnvironment.application; in setUp() 91 final Slice slice = SliceBuilderUtils.buildSlice(mContext, sliceData); in buildIntentSlice_returnsMatchingSlice() 93 SliceTester.testSettingsIntentSlice(mContext, slice, sliceData); in buildIntentSlice_returnsMatchingSlice() 100 final Slice slice = SliceBuilderUtils.buildSlice(mContext, mockData); in buildToggleSlice_returnsMatchingSlice() 107 SliceTester.testSettingsToggleSlice(mContext, slice, mockData); in buildToggleSlice_returnsMatchingSlice() 114 final Slice slice = SliceBuilderUtils.buildSlice(mContext, data); in buildSliderSlice_returnsMatchingSlice() 121 SliceTester.testSettingsSliderSlice(mContext, slice, data); in buildSliderSlice_returnsMatchingSlice() 128 final Slice slice = SliceBuilderUtils.buildSlice(mContext, mockData); in buildCopyableSlice_returnsMatchingSlice() 135 SliceTester.testSettingsCopyableSlice(mContext, slice, mockData); in buildCopyableSlice_returnsMatchingSlice() [all …]
|
D | SliceBroadcastReceiverTest.java | 59 private Context mContext; field in SliceBroadcastReceiverTest 67 mContext = spy(RuntimeEnvironment.application); in setUp() 68 mDb = SlicesDatabaseHelper.getInstance(mContext).getWritableDatabase(); in setUp() 70 SlicesDatabaseHelper helper = SlicesDatabaseHelper.getInstance(mContext); in setUp() 79 DatabaseTestUtils.clearDb(mContext); in cleanUp() 89 doReturn(resolver).when(mContext).getContentResolver(); in onReceive_toggleChanged() 91 final FakeToggleController fakeToggleController = new FakeToggleController(mContext, key); in onReceive_toggleChanged() 101 mReceiver.onReceive(mContext, intent); in onReceive_toggleChanged() 116 final ContentResolver resolver = spy(mContext.getContentResolver()); in toggleUpdate_synchronously_notifyChange_should_be_called() 117 doReturn(resolver).when(mContext).getContentResolver(); in toggleUpdate_synchronously_notifyChange_should_be_called() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenModeSettings.java | 107 private Context mContext; field in ZenModeSettings.SummaryBuilder 110 mContext = context; in SummaryBuilder() 136 mContext.getString(R.string.zen_mode_other_sounds_summary), in getOtherSoundCategoriesSummary() 158 return mContext.getString(R.string.zen_mode_none_calls); in getCallsSettingSummary() 160 return mContext.getString(R.string.zen_mode_calls_summary_one, in getCallsSettingSummary() 163 return mContext.getString(R.string.zen_mode_calls_summary_two, in getCallsSettingSummary() 174 return mContext.getString(R.string.zen_mode_none_messages); in getMessagesSettingSummary() 181 int zenMode = NotificationManager.from(mContext).getZenMode(); in getSoundSummary() 184 ZenModeConfig config = NotificationManager.from(mContext).getZenModeConfig(); in getSoundSummary() 185 String description = ZenModeConfig.getDescription(mContext, true, config, false); in getSoundSummary() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppNotification.java | 104 private Context mContext; field in BluetoothOppNotification 151 mContext = ctx; in BluetoothOppNotification() 153 (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); in BluetoothOppNotification() 155 mContext.getString(R.string.opp_notification_group), in BluetoothOppNotification() 161 mContentResolver = mContext.getContentResolver(); in BluetoothOppNotification() 292 fileName = mContext.getString(R.string.unknown_file); in updateActiveNotification() 307 item.description = mContext.getString(R.string.notification_sending, fileName); in updateActiveNotification() 310 mContext.getString(R.string.notification_receiving, fileName); in updateActiveNotification() 353 mContext.sendBroadcast(intent, Constants.HANDOVER_STATUS_PERMISSION, in updateActiveNotification() 359 Notification.Builder b = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL); in updateActiveNotification() [all …]
|
/packages/apps/Settings/src/com/android/settings/enterprise/ |
D | PrivacySettingsEnterprisePreference.java | 34 private final Context mContext; field in PrivacySettingsEnterprisePreference 37 mContext = context.getApplicationContext(); in PrivacySettingsEnterprisePreference() 53 final SearchIndexableResource sir = new SearchIndexableResource(mContext); in getXmlResourcesToIndex() 65 controllers.add(new NetworkLogsPreferenceController(mContext)); in createPreferenceControllers() 66 controllers.add(new BugReportsPreferenceController(mContext)); in createPreferenceControllers() 67 controllers.add(new SecurityLogsPreferenceController(mContext)); in createPreferenceControllers() 71 mContext, async)); in createPreferenceControllers() 73 new AdminGrantedLocationPermissionsPreferenceController(mContext, async)); in createPreferenceControllers() 75 new AdminGrantedMicrophonePermissionPreferenceController(mContext, async)); in createPreferenceControllers() 77 mContext, async)); in createPreferenceControllers() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/enterprise/ |
D | PrivacySettingsEnterprisePreference.java | 37 private final Context mContext; field in PrivacySettingsEnterprisePreference 40 mContext = context.getApplicationContext(); in PrivacySettingsEnterprisePreference() 56 final SearchIndexableResource sir = new SearchIndexableResource(mContext); in getXmlResourcesToIndex() 68 controllers.add(new NetworkLogsPreferenceController(mContext)); in createPreferenceControllers() 69 controllers.add(new BugReportsPreferenceController(mContext)); in createPreferenceControllers() 70 controllers.add(new SecurityLogsPreferenceController(mContext)); in createPreferenceControllers() 74 mContext, async)); in createPreferenceControllers() 76 new AdminGrantedLocationPermissionsPreferenceController(mContext, async)); in createPreferenceControllers() 78 new AdminGrantedMicrophonePermissionPreferenceController(mContext, async)); in createPreferenceControllers() 80 mContext, async)); in createPreferenceControllers() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/ |
D | MobileNetworkUtilsTest.java | 101 private Context mContext; field in MobileNetworkUtilsTest 113 mContext = spy(ApplicationProvider.getApplicationContext()); in setUp() 114 when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager); in setUp() 115 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 118 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 120 when(mContext.getSystemService(CarrierConfigManager.class)).thenReturn( in setUp() 127 when(mContext.getSystemService(ConnectivityManager.class)).thenReturn(mConnectivityManager); in setUp() 141 when(mContext.getSystemService(TelecomManager.class)).thenReturn(mTelecomManager); in setUp() 144 mMockQueryWfcState = new MockWfcQueryImsState(mContext, SUB_ID_1); in setUp() 149 MobileNetworkUtils.setMobileDataEnabled(mContext, SUB_ID_1, true, false); in setMobileDataEnabled_setEnabled_enabled() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/ |
D | OneHandedActionShowNotificationPrefControllerTest.java | 39 private Context mContext; field in OneHandedActionShowNotificationPrefControllerTest 46 mContext = RuntimeEnvironment.application; in setUp() 47 mUtils = new OneHandedSettingsUtils(mContext); in setUp() 48 mController = new OneHandedActionShowNotificationPrefController(mContext, KEY); in setUp() 49 mPreference = new RadioButtonPreference(mContext); in setUp() 55 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); in updateState_setGesturalMode_shouldEnabled() 56 mUtils.setNavigationBarMode(mContext, "2" /* fully gestural */); in updateState_setGesturalMode_shouldEnabled() 64 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, true); in updateState_ShowNotificationEnabled_shouldChecked() 72 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, false); in updateState_showNotificationDisabled_shouldUnchecked() 81 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() [all …]
|
D | OneHandedActionPullDownPrefControllerTest.java | 39 private Context mContext; field in OneHandedActionPullDownPrefControllerTest 46 mContext = RuntimeEnvironment.application; in setUp() 47 mUtils = new OneHandedSettingsUtils(mContext); in setUp() 48 mController = new OneHandedActionPullDownPrefController(mContext, KEY); in setUp() 49 mPreference = new RadioButtonPreference(mContext); in setUp() 55 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, true); in updateState_showNotificationEnabled_shouldUnchecked() 63 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, false); in updateState_showNotificationDisabled_shouldChecked() 72 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() 73 mUtils.setNavigationBarMode(mContext, "2" /* fully gestural */); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() 82 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); in getAvailabilityStatus_setNavi3ButtonMode_shouldDisabled() [all …]
|
/packages/apps/Settings/src/com/android/settings/sim/ |
D | SimActivationNotifier.java | 80 private final Context mContext; field in SimActivationNotifier 84 mContext = context; in SimActivationNotifier() 89 mContext.getString(R.string.sim_setup_channel_id), in SimActivationNotifier() 94 mContext.getString(R.string.sim_switch_channel_id), in SimActivationNotifier() 132 SubscriptionUtil.getUniqueSubscriptionDisplayName(activeRemovableSub, mContext); in sendNetworkConfigNotification() 135 ? mContext.getString(R.string.sim_card_label) in sendNetworkConfigNotification() 138 mContext.getString( in sendNetworkConfigNotification() 140 String text = mContext.getString(R.string.post_dsds_reboot_notification_text); in sendNetworkConfigNotification() 141 Intent clickIntent = new Intent(mContext, Settings.MobileNetworkListActivity.class); in sendNetworkConfigNotification() 143 TaskStackBuilder.create(mContext).addNextIntent(clickIntent); in sendNetworkConfigNotification() [all …]
|
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/parser/ |
D | ParserUtilsTest.java | 72 private final Context mContext = RuntimeEnvironment.application; field in ParserUtilsTest 77 shadowOf(mContext.getPackageManager()) in setUp() 131 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_provisionManagedDeviceIntent_returnsProvisionManagedDevice() 141 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_provisionManagedProfileIntent_returnsProvisionManagedProfile() 151 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_provisionFinancedDeviceIntent_returnsProvisionFinancedDevice() 161 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_provisionManagedDeviceSilentlyIntent_returnsProvisionManagedDevice() 171 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_nfcIntent_returnsProvisionManagedDevice() 180 mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext); in testExtractProvisioningAction_nfcIntentWithNoMimeType_throwsException() 189 mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext); in extractProvisioningAction_nfcIntentWithWrongMimeType_throwsException() 199 assertThat(mParserUtils.extractProvisioningAction(intent, mSettingsFacade, mContext)) in extractProvisioningAction_trustedSourceDuringSetupWizard_returnsProvisionManagedDevice() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/development/ |
D | DevelopmentSettingsUtilTest.java | 38 private Context mContext = ApplicationProvider.getApplicationContext(); field in DevelopmentSettingsUtilTest 55 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOff_isAdmin_shouldReturnFalse() 58 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, mMockUserManager)) in isEnabled_settingsOff_isAdmin_shouldReturnFalse() 65 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_isAdmin_shouldReturnTrue() 68 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, mMockUserManager)) in isEnabled_settingsOn_isAdmin_shouldReturnTrue() 76 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_notAdmin_shouldReturnFalse() 79 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, mMockUserManager)) in isEnabled_settingsOn_notAdmin_shouldReturnFalse() 87 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_hasDisallowDebuggingRestriction_shouldReturnFalse() 93 assertThat(DevelopmentSettingsUtil.isDevelopmentSettingsEnabled(mContext, mMockUserManager)) in isEnabled_hasDisallowDebuggingRestriction_shouldReturnFalse() 101 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_doesNotHaveDisallowDebuggingRestriction_shouldReturnTrue() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | DarkThemeSliceTest.java | 61 private Context mContext; field in DarkThemeSliceTest 68 mContext = spy(RuntimeEnvironment.application); in setUp() 72 doReturn(mPowerManager).when(mContext).getSystemService(PowerManager.class); in setUp() 74 doReturn(mUiModeManager).when(mContext).getSystemService(UiModeManager.class); in setUp() 78 mDarkThemeSlice = new DarkThemeSlice(mContext); in setUp() 91 mContext.getResources().getConfiguration().uiMode = UI_MODE_NIGHT_YES; in isAvailable_inDarkThemeMode_returnFalse() 93 assertThat(mDarkThemeSlice.isAvailable(mContext)).isFalse(); in isAvailable_inDarkThemeMode_returnFalse() 98 mContext.getResources().getConfiguration().uiMode = UI_MODE_NIGHT_NO; in isAvailable_nonDarkTheme_autoNightMode_returnFalse() 101 assertThat(mDarkThemeSlice.isAvailable(mContext)).isFalse(); in isAvailable_nonDarkTheme_autoNightMode_returnFalse() 106 mContext.getResources().getConfiguration().uiMode = UI_MODE_NIGHT_NO; in isAvailable_nonDarkTheme_customNightMode_returnFalse() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | AbstractZenModeAutomaticRulePreferenceControllerTest.java | 47 private Context mContext; field in AbstractZenModeAutomaticRulePreferenceControllerTest 52 mContext = RuntimeEnvironment.application; in setup() 58 new ComponentName(mContext.getPackageName(), "test"), Uri.EMPTY, in testGetSettingsActivity_configActivity() 60 rule.setPackageName(mContext.getPackageName()); in testGetSettingsActivity_configActivity() 63 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity() 68 assertThat(actual).isEqualTo(new ComponentName(mContext.getPackageName(), "test")); in testGetSettingsActivity_configActivity() 76 rule.setPackageName(mContext.getPackageName()); in testGetSettingsActivity_configActivity_wrongPackage() 79 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity_wrongPackage() 94 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity_unspecifiedOwner() 105 new ComponentName(mContext.getPackageName(), "service"), null, Uri.EMPTY, in testGetSettingsActivity_cps() [all …]
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
D | BluetoothDevicesSlice.java | 83 private final Context mContext; field in BluetoothDevicesSlice 88 mContext = context; in BluetoothDevicesSlice() 105 final ListBuilder listBuilder = new ListBuilder(mContext, getUri(), ListBuilder.INFINITY) in getSlice() 127 final String screenTitle = mContext.getText(R.string.connected_devices_dashboard_title) in getIntent() 130 return SliceBuilderUtils.buildSearchResultPageIntent(mContext, in getIntent() 134 .setClassName(mContext.getPackageName(), SubSettings.class.getName()) in getIntent() 146 mContext.getContentResolver().notifyChange(getUri(), null); in onNotifyChange() 199 final SubSettingLauncher subSettingLauncher = new SubSettingLauncher(mContext); in getBluetoothDetailIntent() 207 .getActivity(mContext, device.hashCode() /* requestCode */, in getBluetoothDetailIntent() 215 BluetoothUtils.getBtRainbowDrawableWithDescription(mContext, device); in getBluetoothDeviceIcon() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | ToggleScreenMagnificationPreferenceFragmentTest.java | 92 private Context mContext; field in ToggleScreenMagnificationPreferenceFragmentTest 101 mContext = spy(ApplicationProvider.getApplicationContext()); in setUpTestFragment() 103 mFragment = spy(new TestToggleScreenMagnificationPreferenceFragment(mContext)); in setUpTestFragment() 104 mResources = spy(mContext.getResources()); in setUpTestFragment() 105 when(mContext.getResources()).thenReturn(mResources); in setUpTestFragment() 115 mContext, UserShortcutType.TRIPLETAP)).isTrue(); in hasValueInSettings_putValue_hasValue() 122 ToggleScreenMagnificationPreferenceFragment.optInAllMagnificationValuesToSettings(mContext, in optInAllValuesToSettings_optInValue_haveMatchString() 135 ToggleScreenMagnificationPreferenceFragment.optInAllMagnificationValuesToSettings(mContext, in optInAllValuesToSettings_existOtherValue_optInValue_haveMatchString() 151 mContext, shortcutTypes); in optOutAllValuesToSettings_optOutValue_emptyString() 167 mContext, shortcutTypes); in optOutValueFromSettings_existOtherValue_optOutValue_haveMatchString() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | SubscriptionsPreferenceControllerTest.java | 108 private Context mContext; field in SubscriptionsPreferenceControllerTest 120 mContext = spy(ApplicationProvider.getApplicationContext()); in setUp() 126 when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager); in setUp() 127 when(mContext.getSystemService(ConnectivityManager.class)).thenReturn(mConnectivityManager); in setUp() 128 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 129 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp() 137 mPreferenceManager = new PreferenceManager(mContext); in setUp() 138 mPreferenceScreen = mPreferenceManager.createPreferenceScreen(mContext); in setUp() 140 mPreferenceCategory = new PreferenceCategory(mContext); in setUp() 150 mController = new FakeSubscriptionsPreferenceController(mContext, mLifecycle, in setUp() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/ |
D | NfcPreferenceControllerTest.java | 65 private Context mContext; field in NfcPreferenceControllerTest 74 mContext = spy(RuntimeEnvironment.application); in setUp() 75 mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext)); in setUp() 76 mNfcAdapter = NfcAdapter.getDefaultAdapter(mContext); in setUp() 78 when(mContext.getApplicationContext()).thenReturn(mContext); in setUp() 79 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); in setUp() 80 when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mManager); in setUp() 82 mNfcController = new NfcPreferenceController(mContext, in setUp() 193 Settings.Global.putString(mContext.getContentResolver(), in isToggleableInAirplaneMode_containNfc_shouldReturnTrue() 196 Settings.Global.putInt(mContext.getContentResolver(), in isToggleableInAirplaneMode_containNfc_shouldReturnTrue() [all …]
|