/packages/apps/Car/Settings/tests/unit/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 | DataUsageSetThresholdBaseFragmentTest.java | 85 mSession = ExtendedMockito.mockitoSession().mockStatic(DataUsageUtils.class, in setUp() 99 when(DataUsageUtils.getDefaultSubscriptionId(any())).thenReturn(SUB_ID); in onActivityCreated_noTemplateSet_getsDefaultTemplate() 100 when(DataUsageUtils.getMobileNetworkTemplate(any(), eq(SUB_ID))) in onActivityCreated_noTemplateSet_getsDefaultTemplate()
|
/packages/apps/Settings/src/com/android/settings/datausage/ |
D | DataUsageSummaryPreferenceController.kt | 62 if (DataUsageUtils.hasMobileData(mContext)) { in <lambda>() 123 DataUsageUtils.formatDataUsage(mContext, /* byteValue = */ 0), in setDataBarSize() 124 DataUsageUtils.formatDataUsage(mContext, dataBarSize) in setDataBarSize() 132 DataUsageUtils.formatDataUsage(mContext, warningBytes), in getLimitInfo() 133 DataUsageUtils.formatDataUsage(mContext, limitBytes), in getLimitInfo() 140 DataUsageUtils.formatDataUsage(mContext, warningBytes), in getLimitInfo() 147 DataUsageUtils.formatDataUsage(mContext, limitBytes), in getLimitInfo()
|
D | DataUsageUtils.java | 48 public final class DataUsageUtils { class 54 private DataUsageUtils() { in DataUsageUtils() method in DataUsageUtils 74 if (DataUsageUtils.TEST_RADIOS) { in hasEthernet() 75 return SystemProperties.get(DataUsageUtils.TEST_RADIOS_PROP).contains(ETHERNET); in hasEthernet()
|
D | DataUsageSummary.java | 92 boolean hasMobileData = DataUsageUtils.hasMobileData(context); in onCreate() 102 boolean hasWifiRadio = DataUsageUtils.hasWifiRadio(context); in onCreate() 116 if (DataUsageUtils.hasEthernet(context)) { in onCreate() 141 DataUsageUtils.getDefaultSubscriptionId(activity)); in createPreferenceControllers()
|
D | DataSaverSummary.kt | 100 DataUsageUtils.hasMobileData(context) && in <lambda>() 101 (DataUsageUtils.getDefaultSubscriptionId(context) != in <lambda>()
|
D | BillingCycleSettings.java | 126 DataUsageUtils.getMobileNetworkTemplateFromSubId(context, getIntent()); in onCreate() 156 mDataWarning.setSummary(DataUsageUtils.formatDataUsage(getContext(), warningBytes)); in updatePrefs() 166 mDataLimit.setSummary(DataUsageUtils.formatDataUsage(getContext(), limitBytes)); in updatePrefs() 532 && DataUsageUtils.hasMobileData(context);
|
D | BillingCyclePreferenceController.java | 50 return DataUsageUtils.hasMobileData(mContext) ? AVAILABLE : CONDITIONALLY_UNAVAILABLE; in getAvailabilityStatus()
|
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/ |
D | DataWarningAndLimitPreferenceController.java | 62 DataUsageUtils.bytesToIecUnits(getContext(), info.warningLevel), in getLimitText() 63 DataUsageUtils.bytesToIecUnits(getContext(), info.limitLevel)); in getLimitText() 66 DataUsageUtils.bytesToIecUnits(getContext(), info.warningLevel)); in getLimitText() 69 DataUsageUtils.bytesToIecUnits(getContext(), info.limitLevel)); in getLimitText()
|
D | AppSpecificDataUsageFragment.java | 82 networkTemplate = DataUsageUtils.getMobileNetworkTemplate(telephonyManager, in onAttach() 83 DataUsageUtils.getDefaultSubscriptionId(subscriptionManager)); in onAttach() 121 .setSummary(DataUsageUtils.bytesToIecUnits(getContext(), cycleData.getTotalUsage()) in onDataCyclePicked() 125 .setSummary(DataUsageUtils.bytesToIecUnits(getContext(), in onDataCyclePicked() 129 .setSummary(DataUsageUtils.bytesToIecUnits(getContext(), in onDataCyclePicked()
|
D | DataUsageEntryPreferenceController.java | 69 SubscriptionPlan defaultPlan = DataUsageUtils.getPrimaryPlan(subscriptionManager, in formatUsedData() 76 return DataUsageUtils.formatDataUsageInCycle(getContext(), defaultPlan.getDataUsageBytes(), in formatUsedData()
|
D | DataWarningAndLimitFragment.java | 77 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate(mTelephonyManager, in onAttach() 78 DataUsageUtils.getDefaultSubscriptionId(mSubscriptionManager)); in onAttach()
|
D | DataUsageSetThresholdBaseFragment.java | 89 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate(mTelephonyManager, in onAttach() 90 DataUsageUtils.getDefaultSubscriptionId(mSubscriptionManager)); in onAttach()
|
D | DataUsageSummaryPreferenceController.java | 144 preference.setMinLabel(DataUsageUtils.bytesToIecUnits(getContext(), /* byteValue= */ 0)); in updateState() 146 DataUsageUtils.bytesToIecUnits(getContext(), mDataplanTrackingThreshold)); in updateState() 209 SubscriptionPlan primaryPlan = DataUsageUtils.getPrimaryPlan(mSubscriptionManager, in refreshDataplanInfo()
|
D | DataUsageUtils.java | 42 public final class DataUsageUtils { class 47 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()
|
D | AppDataUsageTotalPreferenceController.java | 62 mDataUsage = DataUsageUtils.bytesToIecUnits(getContext(), usage).toString(); in setDataUsage()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | DataUsageUtilsTest.java | 66 final boolean hasMobileData = DataUsageUtils.hasMobileData(mContext); in mobileDataStatus_whenNetworkIsSupported() 73 final boolean hasMobileData = DataUsageUtils.hasMobileData(mContext); in mobileDataStatus_whenNetworkIsNotSupported() 79 final CharSequence formattedDataUsage = DataUsageUtils.formatDataUsage( in formatDataUsage_useIECUnit() 92 DataUsageUtils.hasEthernet(mContext); in hasEthernet_shouldQueryEthernetSummaryForUser()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/network/ |
D | NetworkBasePreferenceControllerTest.java | 35 import com.android.car.settings.datausage.DataUsageUtils; 69 .mockStatic(DataUsageUtils.class, withSettings().lenient()) in setUp() 75 ExtendedMockito.when(DataUsageUtils.getMobileNetworkTemplate(mMockTelephonyManager, SUB_ID)) in setUp()
|
/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/datausage/lib/ |
D | NetworkTemplates.kt | 24 import com.android.settings.datausage.DataUsageUtils 52 DataUsageUtils.getDefaultTemplate( in getDefaultTemplate()
|
/packages/apps/Car/Settings/src/com/android/car/settings/network/ |
D | NetworkBasePreferenceController.java | 28 import com.android.car.settings.datausage.DataUsageUtils; 68 mNetworkTemplate = DataUsageUtils.getMobileNetworkTemplate(mTelephonyManager, subId); in setFields()
|
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/network/telephony/ |
D | DataUsagePreferenceControllerTest.kt | 33 import com.android.settings.datausage.DataUsageUtils 81 .spyStatic(DataUsageUtils::class.java) in setUp() 86 ExtendedMockito.doReturn(true).`when` { DataUsageUtils.hasMobileData(context) } in setUp()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | AutoDataSwitchPreferenceController.java | 37 import com.android.settings.datausage.DataUsageUtils; 133 return DataUsageUtils.hasMobileData(mContext); in hasMobileData()
|
D | DataUsagePreferenceController.kt | 32 import com.android.settings.datausage.DataUsageUtils in <lambda>() 57 DataUsageUtils.hasMobileData(mContext) -> AVAILABLE in <lambda>()
|