/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | DeviceConfigUtilsTest.java | 98 @Mock private Context mContext; field in DeviceConfigUtilsTest 110 doReturn(mPm).when(mContext).getPackageManager(); in setUp() 111 doReturn(TEST_PACKAGE_NAME).when(mContext).getPackageName(); in setUp() 116 doReturn(mResources).when(mContext).getResources(); in setUp() 239 assertTrue(DeviceConfigUtils.isNetworkStackFeatureEnabled(mContext, TEST_EXPERIMENT_FLAG)); in testIsFeatureEnabled() 240 assertTrue(DeviceConfigUtils.isTetheringFeatureEnabled(mContext, TEST_EXPERIMENT_FLAG)); in testIsFeatureEnabled() 241 assertTrue(DeviceConfigUtils.isCaptivePortalLoginFeatureEnabled(mContext, in testIsFeatureEnabled() 252 assertFalse(DeviceConfigUtils.isNetworkStackFeatureEnabled(mContext, TEST_EXPERIMENT_FLAG)); in testIsFeatureEnabledFeatureDefaultDisabled() 253 assertFalse(DeviceConfigUtils.isTetheringFeatureEnabled(mContext, TEST_EXPERIMENT_FLAG)); in testIsFeatureEnabledFeatureDefaultDisabled() 254 assertFalse(DeviceConfigUtils.isCaptivePortalLoginFeatureEnabled(mContext, in testIsFeatureEnabledFeatureDefaultDisabled() [all …]
|
/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/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiInjector.java | 153 private final WifiContext mContext; field in WifiInjector 286 mContext = context; in WifiInjector() 287 mAlarmManager = mContext.getSystemService(AlarmManager.class); in WifiInjector() 299 mWifiP2pMetrics = new WifiP2pMetrics(mClock, mContext); in WifiInjector() 304 mWifiMetrics = new WifiMetrics(mContext, mFrameworkFacade, mClock, wifiLooper, in WifiInjector() 312 mWifiNotificationManager = new WifiNotificationManager(mContext); in WifiInjector() 313 mWifiGlobals = new WifiGlobals(mContext); in WifiInjector() 314 mScoringParams = new ScoringParams(mContext); in WifiInjector() 315 mWifiChannelUtilizationScan = new WifiChannelUtilization(mClock, mContext); in WifiInjector() 316 mSettingsMigrationDataHolder = new SettingsMigrationDataHolder(mContext); in WifiInjector() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/consent/ |
D | DeviceRegionProviderTest.java | 45 @Mock private Context mContext; field in DeviceRegionProviderTest 66 doReturn(mPackageManager).when(mContext).getPackageManager(); in testGbEmptyEeaCountriesList() 67 doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class); in testGbEmptyEeaCountriesList() 69 assertThat(DeviceRegionProvider.isEuDevice(mContext)).isFalse(); in testGbEmptyEeaCountriesList() 79 doReturn(mPackageManager).when(mContext).getPackageManager(); in testChEmptyEeaCountriesList() 80 doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class); in testChEmptyEeaCountriesList() 82 assertThat(DeviceRegionProvider.isEuDevice(mContext)).isFalse(); in testChEmptyEeaCountriesList() 92 doReturn(mPackageManager).when(mContext).getPackageManager(); in testUsEmptyEeaCountriesList() 93 doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class); in testUsEmptyEeaCountriesList() 95 assertThat(DeviceRegionProvider.isEuDevice(mContext)).isFalse(); in testUsEmptyEeaCountriesList() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/pm/ |
D | VendorServiceControllerTest.java | 140 private ServiceLauncherContext mContext; field in VendorServiceControllerTest 155 mContext = new ServiceLauncherContext(ApplicationProvider.getApplicationContext()); in setUp() 157 mCarUserService = new CarUserService(mContext, mUserHal, mUserManager, in setUp() 168 mController = new VendorServiceController(mContext, Looper.getMainLooper()); in setUp() 190 mContext.expectNoMoreServiceLaunches(); in init_nothingConfigured() 195 mContext.expectServices(SERVICE_BIND_ALL_USERS_ASAP); in init_systemUser() 199 mContext.expectRecentBoundServices(SERVICE_BIND_ALL_USERS_ASAP); in init_systemUser() 200 mContext.expectNoMoreServiceLaunches(); in init_systemUser() 206 mContext.mBindingFailer = (conn, comp) -> false; in testBindService_callsUnbindServiceWhenFalseReturned() 208 mContext.expectServicesToUnbindOrStop(SERVICE_BIND_ALL_USERS_ASAP); in testBindService_callsUnbindServiceWhenFalseReturned() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | AccessibilityShortcutsTutorialTest.java | 86 private final Context mContext = ApplicationProvider.getApplicationContext(); field in AccessibilityShortcutsTutorialTest 91 mContext.setTheme(androidx.appcompat.R.style.Theme_AppCompat); in setUp() 97 createAccessibilityTutorialDialog(mContext, mShortcutTypes, FAKE_FEATURE_NAME); in createTutorialPages_shortcutListIsEmpty_throwsException() 105 createAccessibilityTutorialDialog(mContext, mShortcutTypes, FAKE_FEATURE_NAME); in createTutorialPages_turnOnTripleTapShortcut_hasOnePage() 109 mContext, mShortcutTypes, FAKE_FEATURE_NAME, /* inSetupWizard= */ false) in createTutorialPages_turnOnTripleTapShortcut_hasOnePage() 120 createAccessibilityTutorialDialog(mContext, mShortcutTypes, FAKE_FEATURE_NAME); in createTutorialPages_turnOnTwoFingerTripleTapShortcut_hasOnePage() 124 mContext, mShortcutTypes, FAKE_FEATURE_NAME, /* inSetupWizard= */ false) in createTutorialPages_turnOnTwoFingerTripleTapShortcut_hasOnePage() 135 createAccessibilityTutorialDialog(mContext, mShortcutTypes, FAKE_FEATURE_NAME); in createTutorialPages_turnOnQuickSettingShortcut_hasOnePage() 139 mContext, mShortcutTypes, FAKE_FEATURE_NAME, /* inSetupWizard= */ false) in createTutorialPages_turnOnQuickSettingShortcut_hasOnePage() 149 createAccessibilityTutorialDialog(mContext, mShortcutTypes, FAKE_FEATURE_NAME); in createTutorialPages_turnOnSoftwareShortcut_hasOnePage() [all …]
|
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/ |
D | CellBroadcastReceiverTest.java | 136 doReturn(mContext).when(mContext).getApplicationContext(); in setUp() 137 doReturn(mPackageName).when(mContext).getPackageName(); in setUp() 138 doReturn(mFakeSharedPreferences).when(mContext).getSharedPreferences(anyString(), anyInt()); in setUp() 139 doReturn(mUserManager).when(mContext).getSystemService(Context.USER_SERVICE); in setUp() 148 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionCarrierConfigChanged() 160 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionCarrierConfigChangedOnRebroadcast() 168 doReturn(mContentResolver).when(mContext).getContentResolver(); in testOnReceive_actionBootCompleted() 172 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_actionBootCompleted() 178 mCellBroadcastReceiver.onReceive(mContext, mIntent); in testOnReceive_cellbroadcastStartConfigAction() 188 doReturn(mUserManager).when(mContext).getSystemService(anyString()); in testOnReceive_actionDefaultSmsSubscriptionChanged() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ShowOnLockscreenNotificationPreferenceControllerTest.java | 53 private Context mContext; field in ShowOnLockscreenNotificationPreferenceControllerTest 67 mContext = RuntimeEnvironment.application; in setUp() 68 mController = new ShowOnLockScreenNotificationPreferenceController(mContext, KEY); in setUp() 70 mContext, Robolectric.buildAttributeSet().build()); in setUp() 83 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_noNotifsOnLockscreen() 87 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_noNotifsOnLockscreen() 97 .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_none)); in updateState_noNotifsOnLockscreen() 102 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_alertingNotifsOnLockscreen() 105 Settings.Secure.putInt(mContext.getContentResolver(), in updateState_alertingNotifsOnLockscreen() 114 .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); in updateState_alertingNotifsOnLockscreen() [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/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/QuickAccessWallet/tests/robolectric/src/com/android/systemui/plugin/globalactions/wallet/ |
D | QuickAccessWalletClientTest.java | 65 private final Context mContext = ApplicationProvider.getApplicationContext(); field in QuickAccessWalletClientTest 76 setDefaultPaymentApp(mContext.getPackageName()); in isWalletServiceAvailable_serviceAvailable_returnsTrue() 79 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_serviceAvailable_returnsTrue() 86 setDefaultPaymentApp(mContext.getPackageName()); in isWalletServiceAvailable_returnsFalseIfServiceUnavailable() 88 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_returnsFalseIfServiceUnavailable() 98 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletServiceAvailable_returnsFalseIfNfcPaymentAppIsAnotherApp() 105 setDefaultPaymentApp(mContext.getPackageName()); in isWalletFeatureAvailable_happyCase() 107 WalletPluginService.updateSettingsFeatureAvailability(mContext, true); in isWalletFeatureAvailable_happyCase() 108 ContentResolver cr = mContext.getContentResolver(); in isWalletFeatureAvailable_happyCase() 111 mWalletClient = QuickAccessWalletClient.create(mContext); in isWalletFeatureAvailable_happyCase() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/access/ |
D | AppPackageAccessResolverTest.java | 44 @Mock private Context mContext; field in AppPackageAccessResolverTest 52 .getAccessInfo(mContext) in isAllowed_allowListedPackages_success() 57 .getAccessInfo(mContext) in isAllowed_allowListedPackages_success() 62 .getAccessInfo(mContext) in isAllowed_allowListedPackages_success() 67 .getAccessInfo(mContext) in isAllowed_allowListedPackages_success() 77 .getAccessInfo(mContext) in isNotAllowed_blockListedPackages_success() 82 .getAccessInfo(mContext) in isNotAllowed_blockListedPackages_success() 87 .getAccessInfo(mContext) in isNotAllowed_blockListedPackages_success() 91 .getAccessInfo(mContext) in isNotAllowed_blockListedPackages_success() 100 .getAccessInfo(mContext) in isNotAllowed_bothListsNull_success() [all …]
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/migration/ |
D | MigrationStateManagerTest.java | 112 @Mock private Context mContext; field in MigrationStateManagerTest 136 when(mContext.getResources()).thenReturn(mResources); in setUp() 139 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 171 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromIdleState_migrationAwarePackage() 187 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromIdleState_migrationUnawarePackage() 201 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromIdleState_migrationUnawareStubPackage() 212 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromAppUpgradeRequiredState_migrationAwarePackage() 229 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromAppUpgradeRequiredState_migrationUnAwarePackage() 243 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromAllowedState() 257 mMigrationStateManager.onPackageInstalledOrChanged(mContext, MOCK_CONFIGURED_PACKAGE); in testOnPackageInstalledOrChanged_fromInProgressState() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/modes/ |
D | ZenModeSummaryHelper.java | 62 private final Context mContext; field in ZenModeSummaryHelper 66 mContext = context; in ZenModeSummaryHelper() 93 mContext.getString(R.string.zen_mode_other_sounds_summary), in getOtherSoundCategoriesSummary() 115 return mContext.getString(R.string.zen_mode_none_calls); in getCallsSettingSummary() 117 return mContext.getString(R.string.zen_mode_calls_summary_one, in getCallsSettingSummary() 120 return mContext.getString(R.string.zen_mode_calls_summary_two, in getCallsSettingSummary() 132 return mContext.getString(R.string.zen_mode_none_messages); in getMessagesSettingSummary() 138 return mContext.getString(R.string.zen_mode_calls_summary_two, in getMessagesSettingSummary() 152 if (mContext.getResources() in getBlockedEffectsSummary() 158 return mContext.getResources().getString( in getBlockedEffectsSummary() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/privatespace/ |
D | PrivateSpaceMaintainerTest.java | 62 private Context mContext; field in PrivateSpaceMaintainerTest 70 mContext = ApplicationProvider.getApplicationContext(); in setUp() 71 mContentResolver = mContext.getContentResolver(); in setUp() 77 PrivateSpaceMaintainer.getInstance(mContext); in tearDown() 86 assumeTrue(mContext.getSystemService(UserManager.class).canAddPrivateProfile()); in deletePrivateSpace_psExists_deletesPS() 88 PrivateSpaceMaintainer.getInstance(mContext); in deletePrivateSpace_psExists_deletesPS() 106 PrivateSpaceMaintainer.getInstance(mContext); in deletePrivateSpace_psDoesNotExist_returnsNoPSError() 120 assumeTrue(mContext.getSystemService(UserManager.class).canAddPrivateProfile()); in createPrivateSpace_psDoesNotExist_createsPS() 122 PrivateSpaceMaintainer.getInstance(mContext); in createPrivateSpace_psDoesNotExist_createsPS() 136 assumeTrue(mContext.getSystemService(UserManager.class).canAddPrivateProfile()); in createPrivateSpace_psExists_returnsFalse() [all …]
|
/packages/modules/Uwb/service/java/com/android/server/uwb/ |
D | DeviceConfigFacade.java | 49 private final Context mContext; field in DeviceConfigFacade 107 mContext = context; in DeviceConfigFacade() 133 mContext.getResources().getBoolean(R.bool.enable_filters) in updateDeviceConfigFlags() 138 mContext.getResources().getInteger(R.integer.filter_distance_inliers_percent) in updateDeviceConfigFlags() 143 mContext.getResources().getInteger(R.integer.filter_distance_window) in updateDeviceConfigFlags() 148 mContext.getResources().getInteger(R.integer.filter_angle_inliers_percent) in updateDeviceConfigFlags() 153 mContext.getResources().getInteger(R.integer.filter_angle_window) in updateDeviceConfigFlags() 158 mContext.getResources().getString(R.string.pose_source_type) in updateDeviceConfigFlags() 163 mContext.getResources().getBoolean(R.bool.enable_primer_est_elevation) in updateDeviceConfigFlags() 168 mContext.getResources().getBoolean(R.bool.enable_primer_aoa) in updateDeviceConfigFlags() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/ |
D | VpnSettingsTest.java | 89 private Context mContext; field in VpnSettingsTest 104 mContext = spy(ApplicationProvider.getApplicationContext()); in setUp() 105 mAdvancedVpnGroup = spy(new PreferenceCategory(mContext)); in setUp() 106 mVpnGroup = spy(new PreferenceCategory(mContext)); in setUp() 109 mPreferenceManager = new PreferenceManager(mContext); in setUp() 110 mPreferenceScreen = mPreferenceManager.createPreferenceScreen(mContext); in setUp() 116 when(mVpnSettings.getContext()).thenReturn(mContext); in setUp() 118 .getAdvancedVpnPreferenceGroupTitle(mContext)).thenReturn(ADVANCED_VPN_GROUP_TITLE); in setUp() 119 when(mFakeFeatureFactory.mAdvancedVpnFeatureProvider.getVpnPreferenceGroupTitle(mContext)) in setUp() 125 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/ |
D | BluetoothOppNotification.java | 140 private Context mContext; field in BluetoothOppNotification 193 mContext = ctx; in BluetoothOppNotification() 194 mNotificationMgr = mContext.getSystemService(NotificationManager.class); in BluetoothOppNotification() 198 mContext.getString(R.string.opp_notification_group), in BluetoothOppNotification() 203 mContentResolver = mContext.getContentResolver(); in BluetoothOppNotification() 330 fileName = mContext.getString(R.string.unknown_file); in updateActiveNotification() 345 item.description = mContext.getString(R.string.notification_sending, fileName); in updateActiveNotification() 348 mContext.getString(R.string.notification_receiving, fileName); in updateActiveNotification() 397 mContext.sendBroadcast( in updateActiveNotification() 405 Notification.Builder b = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL); in updateActiveNotification() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/ |
D | OneHandedActionShowNotificationPrefControllerTest.java | 40 private Context mContext; field in OneHandedActionShowNotificationPrefControllerTest 47 mContext = RuntimeEnvironment.application; in setUp() 48 mUtils = new OneHandedSettingsUtils(mContext); in setUp() 49 mController = new OneHandedActionShowNotificationPrefController(mContext, KEY); in setUp() 50 mPreference = new SelectorWithWidgetPreference(mContext); in setUp() 56 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); in updateState_setGesturalMode_shouldEnabled() 57 mUtils.setNavigationBarMode(mContext, "2" /* fully gestural */); in updateState_setGesturalMode_shouldEnabled() 65 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, true); in updateState_ShowNotificationEnabled_shouldChecked() 73 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, false); in updateState_showNotificationDisabled_shouldUnchecked() 82 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() [all …]
|
D | OneHandedActionPullDownPrefControllerTest.java | 40 private Context mContext; field in OneHandedActionPullDownPrefControllerTest 47 mContext = RuntimeEnvironment.application; in setUp() 48 mUtils = new OneHandedSettingsUtils(mContext); in setUp() 49 mController = new OneHandedActionPullDownPrefController(mContext, KEY); in setUp() 50 mPreference = new SelectorWithWidgetPreference(mContext); in setUp() 56 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, true); in updateState_showNotificationEnabled_shouldUnchecked() 64 OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, false); in updateState_showNotificationDisabled_shouldChecked() 73 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() 74 mUtils.setNavigationBarMode(mContext, "2" /* fully gestural */); in getAvailabilityStatus_setOneHandedModeDisabled_shouldDisabled() 84 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); in getAvailabilityStatus_setNavi3ButtonMode_shouldDisabled() [all …]
|
D | OneHandedSettingsUtilsTest.java | 45 private Context mContext; field in OneHandedSettingsUtilsTest 51 mContext = RuntimeEnvironment.application; in setUp() 58 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); in setOneHandedModeEnabled_setEnable_shouldReturnEnabled() 60 assertThat(Settings.Secure.getIntForUser(mContext.getContentResolver(), in setOneHandedModeEnabled_setEnable_shouldReturnEnabled() 66 OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); in setOneHandedModeEnabled_setDisable_shouldReturnDisabled() 68 assertThat(Settings.Secure.getIntForUser(mContext.getContentResolver(), in setOneHandedModeEnabled_setDisable_shouldReturnDisabled() 74 OneHandedSettingsUtils.setTapsAppToExitEnabled(mContext, true); in setTapsAppToExitEnabled_setEnable_shouldReturnEnabled() 76 assertThat(Settings.Secure.getIntForUser(mContext.getContentResolver(), in setTapsAppToExitEnabled_setEnable_shouldReturnEnabled() 82 OneHandedSettingsUtils.setTapsAppToExitEnabled(mContext, false); in setTapsAppToExitEnabled_setDisable_shouldReturnDisabled() 84 assertThat(Settings.Secure.getIntForUser(mContext.getContentResolver(), in setTapsAppToExitEnabled_setDisable_shouldReturnDisabled() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/ |
D | SliceBuilderUtilsTest.java | 73 private Context mContext; field in SliceBuilderUtilsTest 77 mContext = RuntimeEnvironment.application; in setUp() 90 final Slice slice = SliceBuilderUtils.buildSlice(mContext, sliceData); in buildIntentSlice_returnsMatchingSlice() 92 SliceTester.testSettingsIntentSlice(mContext, slice, sliceData); in buildIntentSlice_returnsMatchingSlice() 99 final Slice slice = SliceBuilderUtils.buildSlice(mContext, mockData); in buildToggleSlice_returnsMatchingSlice() 100 SliceTester.testSettingsToggleSlice(mContext, slice, mockData); in buildToggleSlice_returnsMatchingSlice() 107 final Slice slice = SliceBuilderUtils.buildSlice(mContext, data); in buildSliderSlice_returnsMatchingSlice() 108 SliceTester.testSettingsSliderSlice(mContext, slice, data); in buildSliderSlice_returnsMatchingSlice() 116 final Slice slice = SliceBuilderUtils.buildSlice(mContext, mockData); in buildToggleSlice_withUserRestriction_shouldReturnToggleSlice() 118 SliceTester.testSettingsToggleSlice(mContext, slice, mockData); in buildToggleSlice_withUserRestriction_shouldReturnToggleSlice() [all …]
|
/packages/modules/DeviceLock/DeviceLockController/tests/robolectric/src/com/android/devicelockcontroller/storage/ |
D | SetupParametersTest.java | 36 private Context mContext; field in SetupParametersTest 40 mContext = ApplicationProvider.getApplicationContext(); in setUp() 46 SetupParameters.createPrefs(mContext, bundle); in createPrefs_shouldPopulatePreferences() 48 assertThat(SetupParameters.getKioskPackage(mContext)).isEqualTo(KIOSK_PACKAGE); in createPrefs_shouldPopulatePreferences() 49 assertThat(SetupParameters.getOutgoingCallsDisabled(mContext)).isTrue(); in createPrefs_shouldPopulatePreferences() 50 assertThat(SetupParameters.isNotificationsInLockTaskModeEnabled(mContext)).isTrue(); in createPrefs_shouldPopulatePreferences() 51 assertThat(SetupParameters.isDebuggingAllowed(mContext)).isEqualTo(ALLOW_DEBUGGING); in createPrefs_shouldPopulatePreferences() 56 assertThat(SetupParameters.getKioskAllowlist(mContext)) in createPrefs_shouldPopulatePreferences() 58 assertThat(SetupParameters.getProvisioningType(mContext)).isEqualTo(PROVISIONING_TYPE); in createPrefs_shouldPopulatePreferences() 59 assertThat(SetupParameters.isProvisionMandatory(mContext)).isEqualTo(MANDATORY_PROVISION); in createPrefs_shouldPopulatePreferences() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenModeSettings.java | 108 private Context mContext; field in ZenModeSettings.SummaryBuilder 111 mContext = context; in SummaryBuilder() 138 mContext.getString(R.string.zen_mode_other_sounds_summary), in getOtherSoundCategoriesSummary() 160 return mContext.getString(R.string.zen_mode_none_calls); in getCallsSettingSummary() 162 return mContext.getString(R.string.zen_mode_calls_summary_one, in getCallsSettingSummary() 165 return mContext.getString(R.string.zen_mode_calls_summary_two, in getCallsSettingSummary() 177 return mContext.getString(R.string.zen_mode_none_messages); in getMessagesSettingSummary() 183 return mContext.getString(R.string.zen_mode_calls_summary_two, in getMessagesSettingSummary() 190 int zenMode = NotificationManager.from(mContext).getZenMode(); in getSoundSummary() 193 ZenModeConfig config = NotificationManager.from(mContext).getZenModeConfig(); in getSoundSummary() [all …]
|