/packages/apps/Settings/src/com/android/settings/notification/ |
D | ZenModeBackend.java | 61 protected NotificationManager.Policy mPolicy; field in ZenModeBackend 84 mPolicy = mNotificationManager.getNotificationPolicy(); in updatePolicy() 117 return (mPolicy.suppressedVisualEffects & visualEffect) != 0; in isVisualEffectSuppressed() 121 return (mPolicy.priorityCategories & categoryType) != 0; in isPriorityCategoryEnabled() 125 int priorityCategories = mPolicy.priorityCategories; in getNewDefaultPriorityCategories() 136 return mPolicy.priorityCallSenders; in getPriorityCallSenders() 145 return mPolicy.priorityMessageSenders; in getPriorityMessageSenders() 155 savePolicy(mPolicy.priorityCategories, mPolicy.priorityCallSenders, in saveVisualEffectsPolicy() 156 mPolicy.priorityMessageSenders, suppressedEffects); in saveVisualEffectsPolicy() 161 savePolicy(priorityCategories, mPolicy.priorityCallSenders, in saveSoundPolicy() [all …]
|
D | ZenModeSettingsFooterPreferenceController.java | 198 private NotificationManager.Policy mPolicy; field in ZenModeSettingsFooterPreferenceController.ZenCustomSettingsDialog 202 mPolicy = policy; in setNotificationPolicy() 211 mPolicy = policy; in onCreateDialog() 257 allowCallsText.setText(mSummaryBuilder.getCallsSettingSummary(mPolicy)); in onCreateDialog() 258 allowMessagesText.setText(mSummaryBuilder.getMessagesSettingSummary(mPolicy)); in onCreateDialog() 259 allowAlarmsText.setText(getAllowRes(mPolicy.allowAlarms())); in onCreateDialog() 260 allowMediaText.setText(getAllowRes(mPolicy.allowMedia())); in onCreateDialog() 261 allowSystemText.setText(getAllowRes(mPolicy.allowSystem())); in onCreateDialog() 262 allowRemindersText.setText(getAllowRes(mPolicy.allowReminders())); in onCreateDialog() 263 allowEventsText.setText(getAllowRes(mPolicy.allowEvents())); in onCreateDialog() [all …]
|
D | ZenFooterPreferenceController.java | 37 return mBackend.mPolicy.suppressedVisualEffects == 0 in isAvailable() 38 || Policy.areAllVisualEffectsSuppressed(mBackend.mPolicy.suppressedVisualEffects); in isAvailable() 45 if (mBackend.mPolicy.suppressedVisualEffects == 0) { in updateState() 47 } else if (Policy.areAllVisualEffectsSuppressed(mBackend.mPolicy.suppressedVisualEffects)) { in updateState()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/ |
D | ZenModeBackend.java | 61 protected NotificationManager.Policy mPolicy; field in ZenModeBackend 84 mPolicy = mNotificationManager.getNotificationPolicy(); in updatePolicy() 117 return (mPolicy.suppressedVisualEffects & visualEffect) != 0; in isVisualEffectSuppressed() 121 return (mPolicy.priorityCategories & categoryType) != 0; in isPriorityCategoryEnabled() 125 int priorityCategories = mPolicy.priorityCategories; in getNewDefaultPriorityCategories() 136 return mPolicy.priorityCallSenders; in getPriorityCallSenders() 145 return mPolicy.priorityMessageSenders; in getPriorityMessageSenders() 155 savePolicy(mPolicy.priorityCategories, mPolicy.priorityCallSenders, in saveVisualEffectsPolicy() 156 mPolicy.priorityMessageSenders, suppressedEffects); in saveVisualEffectsPolicy() 161 savePolicy(priorityCategories, mPolicy.priorityCallSenders, in saveSoundPolicy() [all …]
|
D | ZenModeSettingsFooterPreferenceController.java | 198 private NotificationManager.Policy mPolicy; field in ZenModeSettingsFooterPreferenceController.ZenCustomSettingsDialog 202 mPolicy = policy; in setNotificationPolicy() 211 mPolicy = policy; in onCreateDialog() 257 allowCallsText.setText(mSummaryBuilder.getCallsSettingSummary(mPolicy)); in onCreateDialog() 258 allowMessagesText.setText(mSummaryBuilder.getMessagesSettingSummary(mPolicy)); in onCreateDialog() 259 allowAlarmsText.setText(getAllowRes(mPolicy.allowAlarms())); in onCreateDialog() 260 allowMediaText.setText(getAllowRes(mPolicy.allowMedia())); in onCreateDialog() 261 allowSystemText.setText(getAllowRes(mPolicy.allowSystem())); in onCreateDialog() 262 allowRemindersText.setText(getAllowRes(mPolicy.allowReminders())); in onCreateDialog() 263 allowEventsText.setText(getAllowRes(mPolicy.allowEvents())); in onCreateDialog() [all …]
|
D | ZenFooterPreferenceController.java | 37 return mBackend.mPolicy.suppressedVisualEffects == 0 in isAvailable() 38 || Policy.areAllVisualEffectsSuppressed(mBackend.mPolicy.suppressedVisualEffects); in isAvailable() 45 if (mBackend.mPolicy.suppressedVisualEffects == 0) { in updateState() 47 } else if (Policy.areAllVisualEffectsSuppressed(mBackend.mPolicy.suppressedVisualEffects)) { in updateState()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | BluetoothDeviceConnectionPolicyTest.java | 54 private BluetoothDeviceConnectionPolicy mPolicy; field in BluetoothDeviceConnectionPolicyTest 105 mPolicy = BluetoothDeviceConnectionPolicy.create(mMockContext, mUserId, in setUp() 107 Assert.assertTrue(mPolicy != null); in setUp() 113 mPolicy.release(); in tearDown() 114 mPolicy = null; in tearDown() 160 mPolicy.init(); in testInitWithAdapterOn_connectDevices() 177 mPolicy.init(); in testInitWithAdapterOff_doNothing() 198 mPolicy.init(); in testReceivePowerShutdownPrepare_disableBluetooth() 199 mPowerStateListener = mPolicy.getCarPowerStateListener(); in testReceivePowerShutdownPrepare_disableBluetooth() 221 mPolicy.init(); in testReceivePowerOnBluetoothPersistedOff_doNothing() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/detectors/ |
D | HighUsageDetector.java | 47 private BatteryTipPolicy mPolicy; field in HighUsageDetector 59 mPolicy = policy; in HighUsageDetector() 63 mDataParser = new HighUsageDataParser(mPolicy.highUsagePeriodMs, in HighUsageDetector() 64 mPolicy.highUsageBatteryDraining); in HighUsageDetector() 72 if (mPolicy.highUsageEnabled && mDischarging) { in detect() 74 if (mDataParser.isDeviceHeavilyUsed() || mPolicy.testHighUsageTip) { in detect() 94 if (mPolicy.testHighUsageTip && mHighUsageAppList.isEmpty()) { in detect() 103 Math.min(mPolicy.highUsageAppCount, mHighUsageAppList.size())); in detect()
|
D | LowBatteryDetector.java | 34 private BatteryTipPolicy mPolicy; field in LowBatteryDetector 39 mPolicy = policy; in LowBatteryDetector() 51 && mBatteryInfo.remainingTimeUs < TimeUnit.HOURS.toMicros(mPolicy.lowBatteryHour)); in detect() 54 if (mPolicy.lowBatteryEnabled) { in detect() 58 } else if (mPolicy.testLowBatteryTip || (mBatteryInfo.discharging && lowBattery)) { in detect()
|
D | EarlyWarningDetector.java | 35 private BatteryTipPolicy mPolicy; field in EarlyWarningDetector 41 mPolicy = policy; in EarlyWarningDetector() 56 EarlyWarningDetector.class.getName()) || mPolicy.testBatterySaverTip; in detect() 60 : mPolicy.batterySaverTipEnabled && discharging && earlyWarning in detect()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | HighUsageDetector.java | 46 private BatteryTipPolicy mPolicy; field in HighUsageDetector 58 mPolicy = policy; in HighUsageDetector() 62 mDataParser = new HighUsageDataParser(mPolicy.highUsagePeriodMs, in HighUsageDetector() 63 mPolicy.highUsageBatteryDraining); in HighUsageDetector() 71 if (mPolicy.highUsageEnabled && mDischarging) { in detect() 73 if (mDataParser.isDeviceHeavilyUsed() || mPolicy.testHighUsageTip) { in detect() 97 if (mHighUsageAppList.size() >= mPolicy.highUsageAppCount) { in detect() 104 if (mPolicy.testHighUsageTip && mHighUsageAppList.isEmpty()) { in detect()
|
D | LowBatteryDetector.java | 34 private BatteryTipPolicy mPolicy; field in LowBatteryDetector 39 mPolicy = policy; in LowBatteryDetector() 51 && mBatteryInfo.remainingTimeUs < TimeUnit.HOURS.toMicros(mPolicy.lowBatteryHour)); in detect() 54 if (mPolicy.lowBatteryEnabled) { in detect() 58 } else if (mPolicy.testLowBatteryTip || (mBatteryInfo.discharging && lowBattery)) { in detect()
|
D | EarlyWarningDetector.java | 35 private BatteryTipPolicy mPolicy; field in EarlyWarningDetector 41 mPolicy = policy; in EarlyWarningDetector() 56 EarlyWarningDetector.class.getName()) || mPolicy.testBatterySaverTip; in detect() 60 : mPolicy.batterySaverTipEnabled && discharging && earlyWarning in detect()
|
D | RestrictAppDetector.java | 46 private BatteryTipPolicy mPolicy; field in RestrictAppDetector 56 mPolicy = policy; in RestrictAppDetector() 67 if (mPolicy.appRestrictionEnabled) { in detect() 69 - TimeUnit.HOURS.toMillis(mPolicy.appRestrictionActiveHour); in detect()
|
/packages/apps/Email/src/com/android/email/activity/setup/ |
D | SetupDataFragment.java | 54 private volatile Policy mPolicy; field in SetupDataFragment 66 mPolicy = null; in SetupDataFragment() 81 outState.putParcelable(SAVESTATE_POLICY, mPolicy); in onSaveInstanceState() 96 mPolicy = savedInstanceState.getParcelable(SAVESTATE_POLICY); in onCreate() 159 return mPolicy; in getPolicy() 163 mPolicy = policy; in setPolicy() 250 dest.writeParcelable(mPolicy, 0); in writeToParcel() 262 mPolicy = in.readParcelable(loader); in SetupDataFragment() 279 sb.append(mPolicy == null ? "none" : "exists"); in toString()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | LowBatteryDetectorTest.java | 48 private BatteryTipPolicy mPolicy; field in LowBatteryDetectorTest 57 mPolicy = spy(new BatteryTipPolicy(RuntimeEnvironment.application)); in setUp() 60 ReflectionHelpers.setField(mPolicy, "lowBatteryEnabled", true); in setUp() 61 ReflectionHelpers.setField(mPolicy, "lowBatteryHour", 3); in setUp() 64 mLowBatteryDetector = new LowBatteryDetector(mContext, mPolicy, mBatteryInfo); in setUp() 69 ReflectionHelpers.setField(mPolicy, "lowBatteryEnabled", false); in testDetect_disabledByPolicy_tipInvisible() 77 ReflectionHelpers.setField(mPolicy, "testLowBatteryTip", true); in testDetect_enabledByTest_tipNew()
|
D | SummaryDetectorTest.java | 38 private BatteryTipPolicy mPolicy; field in SummaryDetectorTest 45 mPolicy = spy(new BatteryTipPolicy(RuntimeEnvironment.application)); in setUp() 50 ReflectionHelpers.setField(mPolicy, "summaryEnabled", false); in testDetect_disabledByPolicy_tipInvisible() 51 SummaryDetector detector = new SummaryDetector(mPolicy, AVERAGE_TIME_MS); in testDetect_disabledByPolicy_tipInvisible() 58 SummaryDetector detector = new SummaryDetector(mPolicy, AVERAGE_TIME_MS); in testDetect_notDisabled_tipVisible()
|
D | HighUsageDetectorTest.java | 74 private BatteryTipPolicy mPolicy; field in HighUsageDetectorTest 84 mPolicy = spy(new BatteryTipPolicy(mContext)); in setUp() 86 mHighUsageDetector = spy(new HighUsageDetector(mContext, mPolicy, mBatteryStatsHelper, in setUp() 122 ReflectionHelpers.setField(mPolicy, "highUsageEnabled", false); in testDetect_disabledByPolicy_tipInvisible() 129 ReflectionHelpers.setField(mPolicy, "highUsageEnabled", true); in testDetect_deviceCharging_tipInvisible() 139 ReflectionHelpers.setField(mPolicy, "testHighUsageTip", true); in testDetect_testFeatureOn_tipNew()
|
D | EarlyWarningDetectorTest.java | 47 private BatteryTipPolicy mPolicy; field in EarlyWarningDetectorTest 60 mPolicy = spy(new BatteryTipPolicy(mContext)); in setUp() 68 mEarlyWarningDetector = new EarlyWarningDetector(mPolicy, mContext); in setUp() 73 ReflectionHelpers.setField(mPolicy, "batterySaverTipEnabled", false); in testDetect_policyDisabled_tipInvisible() 82 ReflectionHelpers.setField(mPolicy, "testBatterySaverTip", true); in testDetect_testFeatureOn_tipNew()
|
D | SmartBatteryDetectorTest.java | 44 private BatteryTipPolicy mPolicy; field in SmartBatteryDetectorTest 52 mPolicy = spy(new BatteryTipPolicy(mContext)); in setUp() 53 mSmartBatteryDetector = new SmartBatteryDetector(mPolicy, mContentResolver); in setUp() 58 ReflectionHelpers.setField(mPolicy, "testSmartBatteryTip", true); in testDetect_testFeatureOn_tipNew()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | ZenModeVisEffectsCustomPreferenceControllerTest.java | 89 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in isAvailable_noVisEffects() 95 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 1); in isAvailable_visEffects() 101 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateState_notChecked_noVisEffects() 118 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in updateState_notChecked_allVisEffects() 126 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_checked() 134 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in updateState_listeners()
|
D | ZenFooterPreferenceControllerTest.java | 87 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in isAvailable_noVisEffects() 93 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in isAvailable_someVisEffects() 108 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in isAvailable_allVisEffects() 114 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 0); in updateSummary_noVisEffects() 121 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, 2); in getSummary_someVisEffects() 137 mBackend.mPolicy = new NotificationManager.Policy(0, 0, 0, allSuppressed); in getSummary_allVisEffects()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/ |
D | ChartDataUsagePreference.java | 48 private NetworkPolicy mPolicy; field in ChartDataUsagePreference 80 bindNetworkPolicy(chart, mPolicy, top); in onBindViewHolder() 86 mPolicy != null ? Math.max(mPolicy.limitBytes, mPolicy.warningBytes) : 0; in getTop() 162 mPolicy = policy; in setNetworkPolicy()
|
/packages/apps/Settings/src/com/android/settings/datausage/ |
D | ChartDataUsagePreference.java | 48 private NetworkPolicy mPolicy; field in ChartDataUsagePreference 80 bindNetworkPolicy(chart, mPolicy, top); in onBindViewHolder() 86 mPolicy != null ? Math.max(mPolicy.limitBytes, mPolicy.warningBytes) : 0; in getTop() 162 mPolicy = policy; in setNetworkPolicy()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/ |
D | AnomalyDetectionJobServiceTest.java | 103 private BatteryTipPolicy mPolicy; field in AnomalyDetectionJobServiceTest 114 mPolicy = new BatteryTipPolicy(mContext); in setUp() 146 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_systemWhitelisted_doNotSave() 167 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_systemApp_doNotSaveButLog() 187 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_systemUid_doNotSave() 202 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_uidNull_doNotSave() 222 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_normalAppWithAutoRestriction_save() 247 mUserManager, mBatteryDatabaseManager, mBatteryUtils, mPolicy, in saveAnomalyToDatabase_normalAppWithoutAutoRestriction_save()
|