/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/datausage/ |
D | DataUsageUtilsTest.java | 45 assertThat(DataUsageUtils.getDefaultSubscriptionId(null)).isEqualTo( in getDefaultSubscriptionId_nullSubscriptionManager_returnsInvalidId() 55 assertThat(DataUsageUtils.getDefaultSubscriptionId(subscriptionManager)).isEqualTo( in getDefaultSubscriptionId_noSubscriptions_returnsInvalidId() 71 assertThat(DataUsageUtils.getDefaultSubscriptionId(subscriptionManager)).isEqualTo(1); in getDefaultSubscriptionId_noDefaultSubscription_returnsFirstSubscription() 81 assertThat(DataUsageUtils.getDefaultSubscriptionId(subscriptionManager)).isEqualTo(1); in getDefaultSubscriptionId_hasDefaultSubscription_returnsDefaultSubscription() 90 assertThat(DataUsageUtils.getPrimaryPlan(subscriptionManager, SUBSCRIPTION_ID)).isNull(); in getPrimaryPlan_noSubscriptions_returnsNull() 101 assertThat(DataUsageUtils.getPrimaryPlan(subscriptionManager, SUBSCRIPTION_ID)).isNull(); in getPrimaryPlan_dataLimitBytesIsZero_returnsNull() 112 when(subscriptionPlan.getDataUsageBytes()).thenReturn(2 * DataUsageUtils.PETA); in getPrimaryPlan_dataUsageBytesIsHuge_returnsNull() 114 assertThat(DataUsageUtils.getPrimaryPlan(subscriptionManager, SUBSCRIPTION_ID)).isNull(); in getPrimaryPlan_dataUsageBytesIsHuge_returnsNull() 127 assertThat(DataUsageUtils.getPrimaryPlan(subscriptionManager, SUBSCRIPTION_ID)).isNull(); in getPrimaryPlan_cycleRuleIsNull_returnsNull() 141 assertThat(DataUsageUtils.getPrimaryPlan(subscriptionManager, SUBSCRIPTION_ID)).isEqualTo( in getPrimaryPlan_cycleRuleIsValid_returnsSubscriptionPlan()
|
D | DataUsageSummaryPreferenceControllerTest.java | 93 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate( in setUp() 95 DataUsageUtils.getDefaultSubscriptionId( in setUp() 159 DataUsageUtils.bytesToIecUnits(mContext, info.limitLevel)).toString()); in refreshUi_hasLimit_setsDataLimitText() 175 DataUsageUtils.bytesToIecUnits(mContext, info.warningLevel)).toString()); in refreshUi_hasWarning_setsDataLimitText() 191 DataUsageUtils.bytesToIecUnits(mContext, info.warningLevel), in refreshUi_hasWarningAndLimit_setsDataLimitText() 192 DataUsageUtils.bytesToIecUnits(mContext, info.limitLevel)).toString()); in refreshUi_hasWarningAndLimit_setsDataLimitText()
|
/packages/apps/Settings/src/com/android/settings/datausage/ |
D | DataUsageSummary.java | 83 boolean hasMobileData = DataUsageUtils.hasMobileData(context); in onCreate() 89 mDefaultTemplate = DataUsageUtils.getDefaultTemplate(context, defaultSubId); in onCreate() 95 boolean hasWifiRadio = DataUsageUtils.hasWifiRadio(context); in onCreate() 98 if (DataUsageUtils.hasSim(context) && hasWifiRadio) { in onCreate() 109 if (DataUsageUtils.hasEthernet(context)) { in onCreate() 140 DataUsageUtils.getDefaultSubscriptionId(activity)); in createPreferenceControllers() 154 category.setTemplate(DataUsageUtils.getMobileTemplate(getContext(), subId), in addMobileSection() 270 if (DataUsageUtils.hasSim(mActivity)) { in setListening() 284 DataUsageUtils.formatDataUsage(mActivity, info.usageLevel); in setListening() 305 return DataUsageUtils.formatDataUsage(mActivity, dfltPlan.getDataUsageBytes()); in formatUsedData() [all …]
|
D | DataUsageSummaryPreferenceController.java | 113 mDefaultTemplate = DataUsageUtils.getDefaultTemplate(activity, mSubscriptionId); in DataUsageSummaryPreferenceController() 117 mHasMobileData = DataUsageUtils.hasMobileData(activity) in DataUsageSummaryPreferenceController() 126 } else if (DataUsageUtils.hasWifiRadio(activity)) { in DataUsageSummaryPreferenceController() 190 return DataUsageUtils.hasSim(mActivity) in getAvailabilityStatus() 191 || DataUsageUtils.hasWifiRadio(mContext) ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; in getAvailabilityStatus() 199 if (DataUsageUtils.hasSim(mActivity)) { in updateState() 229 DataUsageUtils.formatDataUsage(mContext, info.warningLevel), in updateState() 230 DataUsageUtils.formatDataUsage(mContext, info.limitLevel))); in updateState() 234 DataUsageUtils.formatDataUsage(mContext, info.warningLevel))); in updateState() 238 DataUsageUtils.formatDataUsage(mContext, info.limitLevel))); in updateState() [all …]
|
D | DataUsageUtils.java | 42 public final class DataUsageUtils extends com.android.settingslib.net.DataUsageUtils { class 49 private DataUsageUtils() { in DataUsageUtils() method in DataUsageUtils 66 if (DataUsageUtils.TEST_RADIOS) { in hasEthernet() 67 return SystemProperties.get(DataUsageUtils.TEST_RADIOS_PROP).contains(ETHERNET); in hasEthernet() 106 if (DataUsageUtils.TEST_RADIOS) { in hasReadyMobileRadio() 107 return SystemProperties.get(DataUsageUtils.TEST_RADIOS_PROP).contains("mobile"); in hasReadyMobileRadio()
|
D | BillingCycleSettings.java | 110 mNetworkTemplate = DataUsageUtils.getDefaultTemplate(context, in onCreate() 111 DataUsageUtils.getDefaultSubscriptionId(context)); in onCreate() 136 mDataWarning.setSummary(DataUsageUtils.formatDataUsage(getContext(), warningBytes)); in updatePrefs() 146 mDataLimit.setSummary(DataUsageUtils.formatDataUsage(getContext(), limitBytes)); in updatePrefs() 492 return DataUsageUtils.hasMobileData(context);
|
D | WifiDataUsageSummaryPreferenceController.java | 68 mPreference.setLabels(DataUsageUtils.formatDataUsage(mContext, /* sizeBytes */ 0), in updateState() 69 DataUsageUtils.formatDataUsage(mContext, info.usageLevel)); in updateState()
|
D | AppDataUsage.java | 123 mTemplate = DataUsageUtils.getDefaultTemplate(mContext, in onCreate() 320 mTotalUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, totalBytes)); in bindData() 321 mForegroundUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, foregroundBytes)); in bindData() 322 mBackgroundUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, backgroundBytes)); in bindData()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/ |
D | DataUsageSummary.java | 88 boolean hasMobileData = DataUsageUtils.hasMobileData(context); in onCreate() 94 mDefaultTemplate = DataUsageUtils.getDefaultTemplate(context, defaultSubId); in onCreate() 100 boolean hasWifiRadio = DataUsageUtils.hasWifiRadio(context); in onCreate() 103 if (DataUsageUtils.hasSim(context) && hasWifiRadio) { in onCreate() 114 if (DataUsageUtils.hasEthernet(context)) { in onCreate() 145 DataUsageUtils.getDefaultSubscriptionId(activity)); in createPreferenceControllers() 281 if (DataUsageUtils.hasSim(mActivity)) { in setListening() 295 DataUsageUtils.formatDataUsage(mActivity, info.usageLevel); in setListening() 316 return DataUsageUtils.formatDataUsage(mActivity, dfltPlan.getDataUsageBytes()); in formatUsedData() 326 return DataUsageUtils.formatDataUsage(mActivity, 0); in formatFallbackData() [all …]
|
D | DataUsageSummaryPreferenceController.java | 114 mDefaultTemplate = DataUsageUtils.getDefaultTemplate(activity, mSubscriptionId); in DataUsageSummaryPreferenceController() 118 mHasMobileData = DataUsageUtils.hasMobileData(activity) in DataUsageSummaryPreferenceController() 127 } else if (DataUsageUtils.hasWifiRadio(activity)) { in DataUsageSummaryPreferenceController() 191 return DataUsageUtils.hasSim(mActivity) in getAvailabilityStatus() 192 || DataUsageUtils.hasWifiRadio(mContext) ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; in getAvailabilityStatus() 200 if (DataUsageUtils.hasSim(mActivity)) { in updateState() 230 DataUsageUtils.formatDataUsage(mContext, info.warningLevel), in updateState() 231 DataUsageUtils.formatDataUsage(mContext, info.limitLevel))); in updateState() 235 DataUsageUtils.formatDataUsage(mContext, info.warningLevel))); in updateState() 239 DataUsageUtils.formatDataUsage(mContext, info.limitLevel))); in updateState() [all …]
|
D | DataUsageUtils.java | 41 public final class DataUsageUtils { class 48 private DataUsageUtils() { in DataUsageUtils() method in DataUsageUtils 65 if (DataUsageUtils.TEST_RADIOS) { in hasEthernet() 66 return SystemProperties.get(DataUsageUtils.TEST_RADIOS_PROP).contains(ETHERNET); in hasEthernet() 105 if (DataUsageUtils.TEST_RADIOS) { in hasReadyMobileRadio() 106 return SystemProperties.get(DataUsageUtils.TEST_RADIOS_PROP).contains("mobile"); in hasReadyMobileRadio()
|
D | BillingCycleSettings.java | 110 mNetworkTemplate = DataUsageUtils.getDefaultTemplate(context, in onCreate() 111 DataUsageUtils.getDefaultSubscriptionId(context)); in onCreate() 136 mDataWarning.setSummary(DataUsageUtils.formatDataUsage(getContext(), warningBytes)); in updatePrefs() 146 mDataLimit.setSummary(DataUsageUtils.formatDataUsage(getContext(), limitBytes)); in updatePrefs() 492 return DataUsageUtils.hasMobileData(context);
|
D | AppDataUsage.java | 123 mTemplate = DataUsageUtils.getDefaultTemplate(mContext, in onCreate() 320 mTotalUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, totalBytes)); in bindData() 321 mForegroundUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, foregroundBytes)); in bindData() 322 mBackgroundUsage.setSummary(DataUsageUtils.formatDataUsage(mContext, backgroundBytes)); in bindData()
|
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/ |
D | DataUsageSummaryPreferenceController.java | 95 int defaultSubId = DataUsageUtils.getDefaultSubscriptionId(mSubscriptionManager); in DataUsageSummaryPreferenceController() 96 mDefaultTemplate = DataUsageUtils.getMobileNetworkTemplate(mTelephonyManager, defaultSubId); in DataUsageSummaryPreferenceController() 141 preference.setMinLabel(DataUsageUtils.bytesToIecUnits(getContext(), /* byteValue= */ 0)); in updateState() 143 DataUsageUtils.bytesToIecUnits(getContext(), mDataplanTrackingThreshold)); in updateState() 169 DataUsageUtils.bytesToIecUnits(getContext(), info.warningLevel), in getLimitText() 170 DataUsageUtils.bytesToIecUnits(getContext(), info.limitLevel)); in getLimitText() 173 DataUsageUtils.bytesToIecUnits(getContext(), info.warningLevel)); in getLimitText() 176 DataUsageUtils.bytesToIecUnits(getContext(), info.limitLevel)); in getLimitText() 238 SubscriptionPlan primaryPlan = DataUsageUtils.getPrimaryPlan(mSubscriptionManager, in refreshDataplanInfo()
|
D | DataUsageEntryPreferenceController.java | 65 SubscriptionPlan defaultPlan = DataUsageUtils.getPrimaryPlan(subscriptionManager, in formatUsedData() 71 return DataUsageUtils.bytesToIecUnits(getContext(), defaultPlan.getDataUsageBytes()); in formatUsedData()
|
D | DataWarningAndLimitFragment.java | 72 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate(mTelephonyManager, in onAttach() 73 DataUsageUtils.getDefaultSubscriptionId(mSubscriptionManager)); in onAttach()
|
D | DataUsageUtils.java | 36 public final class DataUsageUtils { class 41 private DataUsageUtils() { in DataUsageUtils() method in DataUsageUtils
|
D | AppDataUsageFragment.java | 88 subId = DataUsageUtils.getDefaultSubscriptionId(subscriptionManager); in onAttach() 90 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate(telephonyManager, subId); in onAttach()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageUtilsTest.java | 67 boolean hasMobileData = DataUsageUtils.hasMobileData(mContext); in mobileDataStatus_whenNetworkIsSupported() 74 boolean hasMobileData = DataUsageUtils.hasMobileData(mContext); in mobileDataStatus_whenNetworkIsNotSupported() 81 boolean hasSim = DataUsageUtils.hasSim(mContext); in hasSim_simStateReady() 88 boolean hasSim = DataUsageUtils.hasSim(mContext); in hasSim_simStateMissing() 94 final CharSequence formattedDataUsage = DataUsageUtils.formatDataUsage( in formatDataUsage_useIECUnit() 106 DataUsageUtils.hasEthernet(mContext); in hasEthernet_shouldQueryEthernetSummaryForUser()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | DataUsagePreferenceController.java | 29 import com.android.settings.datausage.DataUsageUtils; 79 DataUsageUtils.formatDataUsage(mContext, mDataUsageInfo.usageLevel), in updateState() 88 mTemplate = DataUsageUtils.getDefaultTemplate(mContext, mSubId); in init()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/appinfo/ |
D | AppDataUsagePreferenceController.java | 35 import com.android.car.developeroptions.datausage.DataUsageUtils; 138 if (DataUsageUtils.hasReadyMobileRadio(context)) { in getTemplate() 141 if (DataUsageUtils.hasWifiRadio(context)) { in getTemplate()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | AppDataUsagePreferenceController.java | 35 import com.android.settings.datausage.DataUsageUtils; 138 if (DataUsageUtils.hasReadyMobileRadio(context)) { in getTemplate() 141 if (DataUsageUtils.hasWifiRadio(context)) { in getTemplate()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/ |
D | ShadowDataUsageUtils.java | 6 import com.android.settings.datausage.DataUsageUtils; 11 @Implements(DataUsageUtils.class)
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/deviceinfo/ |
D | DataUsageSlice.java | 40 import com.android.settings.datausage.DataUsageUtils; 78 if (DataUsageUtils.hasSim(mContext)) { in getSlice()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/deviceinfo/ |
D | DataUsageSlice.java | 40 import com.android.car.developeroptions.datausage.DataUsageUtils; 78 if (DataUsageUtils.hasSim(mContext)) { in getSlice()
|