Merge "Hide 'View plan' button in data usage settings" into rvc-qpr-dev am: 1a09d244d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12755868

Change-Id: I0026c3fbb1bf26d68f203c36c49576deb6d79681
diff --git a/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java b/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
index 97cf599..51f5213 100644
--- a/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
+++ b/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
@@ -325,7 +325,10 @@
                 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
                 + ", intent " + mManageSubscriptionIntent);
     }
diff --git a/tests/robotests/src/com/android/settings/datausage/DataUsageSummaryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/datausage/DataUsageSummaryPreferenceControllerTest.java
index 210f0fd7..4a5bc70 100644
--- a/tests/robotests/src/com/android/settings/datausage/DataUsageSummaryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/datausage/DataUsageSummaryPreferenceControllerTest.java
@@ -184,9 +184,10 @@
         CharSequence value = captor.getValue();
         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,
                 now - UPDATE_BACKOFF_MS,
-                CARRIER_NAME, 1 /* numPlans */, intent);
+                CARRIER_NAME, 1 /* numPlans */, null /* launchIntent */);
         verify(mSummaryPreference).setChartEnabled(true);
         verify(mSummaryPreference).setWifiMode(false /* isWifiMode */, null /* usagePeriod */,
                 false /* isSingleWifi */);