Hide 'View plan' button in data usage settings
There are currently no callers of the setSubscriptionPlan() API that have a MDP app set up. Remove the button when SubscriptionPlans are defined, since it does nothing and causes confusion for users. Test: manually verify button does not exist when a plan is defined Test: make RunSettingsRoboTests Bug: 169806315 Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
This commit is contained in:
@@ -325,7 +325,10 @@ public class DataUsageSummaryPreferenceController extends TelephonyBasePreferenc
|
|||||||
mSnapshotTime = primaryPlan.getDataUsageTime();
|
mSnapshotTime = primaryPlan.getDataUsageTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mManageSubscriptionIntent = createManageSubscriptionIntent(mSubId);
|
// Temporarily return null, since no current users of SubscriptionPlan have this intent set.
|
||||||
|
// TODO (b/170330084): Remove after refactoring 5G SubscriptionPlan logic.
|
||||||
|
// mManageSubscriptionIntent = createManageSubscriptionIntent(mSubId);
|
||||||
|
mManageSubscriptionIntent = null;
|
||||||
Log.i(TAG, "Have " + mDataplanCount + " plans, dflt sub-id " + mSubId
|
Log.i(TAG, "Have " + mDataplanCount + " plans, dflt sub-id " + mSubId
|
||||||
+ ", intent " + mManageSubscriptionIntent);
|
+ ", intent " + mManageSubscriptionIntent);
|
||||||
}
|
}
|
||||||
|
@@ -184,9 +184,10 @@ public class DataUsageSummaryPreferenceControllerTest {
|
|||||||
CharSequence value = captor.getValue();
|
CharSequence value = captor.getValue();
|
||||||
assertThat(value.toString()).isEqualTo("512 MB data warning / 1.00 GB data limit");
|
assertThat(value.toString()).isEqualTo("512 MB data warning / 1.00 GB data limit");
|
||||||
|
|
||||||
|
// TODO (b/170330084): return intent instead of null for mSummaryPreference
|
||||||
verify(mSummaryPreference).setUsageInfo((info.cycleEnd / 1000) * 1000,
|
verify(mSummaryPreference).setUsageInfo((info.cycleEnd / 1000) * 1000,
|
||||||
now - UPDATE_BACKOFF_MS,
|
now - UPDATE_BACKOFF_MS,
|
||||||
CARRIER_NAME, 1 /* numPlans */, intent);
|
CARRIER_NAME, 1 /* numPlans */, null /* launchIntent */);
|
||||||
verify(mSummaryPreference).setChartEnabled(true);
|
verify(mSummaryPreference).setChartEnabled(true);
|
||||||
verify(mSummaryPreference).setWifiMode(false /* isWifiMode */, null /* usagePeriod */,
|
verify(mSummaryPreference).setWifiMode(false /* isWifiMode */, null /* usagePeriod */,
|
||||||
false /* isSingleWifi */);
|
false /* isSingleWifi */);
|
||||||
|
Reference in New Issue
Block a user