diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 61b4c8d5d3884..73aa155bf7fcd 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2532,4 +2532,6 @@
is installed. -->
false
+ com.android.systemui/com.android.systemui.net.NetworkOverLimitActivity
+ com.android.settings/com.android.settings.Settings$DataUsageSummaryActivity
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 54cb9cef29360..b7087ec21c2f3 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2648,6 +2648,10 @@
+
+
+
+
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index b382a3b395842..f433af8e7e33a 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -1036,7 +1036,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
*/
private void notifyOverLimitNL(NetworkTemplate template) {
if (!mOverLimitNotified.contains(template)) {
- mContext.startActivity(buildNetworkOverLimitIntent(template));
+ mContext.startActivity(buildNetworkOverLimitIntent(mContext.getResources(), template));
mOverLimitNotified.add(template);
}
}
@@ -1081,7 +1081,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
builder.setDeleteIntent(PendingIntent.getBroadcast(
mContext, 0, snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT));
- final Intent viewIntent = buildViewDataUsageIntent(policy.template);
+ final Intent viewIntent = buildViewDataUsageIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, viewIntent, PendingIntent.FLAG_UPDATE_CURRENT));
@@ -1117,7 +1117,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
builder.setContentTitle(title);
builder.setContentText(body);
- final Intent intent = buildNetworkOverLimitIntent(policy.template);
+ final Intent intent = buildNetworkOverLimitIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
break;
@@ -1152,7 +1152,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
builder.setContentTitle(title);
builder.setContentText(body);
- final Intent intent = buildViewDataUsageIntent(policy.template);
+ final Intent intent = buildViewDataUsageIntent(res, policy.template);
builder.setContentIntent(PendingIntent.getActivity(
mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
break;
@@ -3525,19 +3525,19 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
return intent;
}
- private static Intent buildNetworkOverLimitIntent(NetworkTemplate template) {
+ private static Intent buildNetworkOverLimitIntent(Resources res, NetworkTemplate template) {
final Intent intent = new Intent();
- intent.setComponent(new ComponentName(
- "com.android.systemui", "com.android.systemui.net.NetworkOverLimitActivity"));
+ intent.setComponent(ComponentName.unflattenFromString(
+ res.getString(R.string.config_networkOverLimitComponent)));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_NETWORK_TEMPLATE, template);
return intent;
}
- private static Intent buildViewDataUsageIntent(NetworkTemplate template) {
+ private static Intent buildViewDataUsageIntent(Resources res, NetworkTemplate template) {
final Intent intent = new Intent();
- intent.setComponent(new ComponentName(
- "com.android.settings", "com.android.settings.Settings$DataUsageSummaryActivity"));
+ intent.setComponent(ComponentName.unflattenFromString(
+ res.getString(R.string.config_dataUsageSummaryComponent)));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(EXTRA_NETWORK_TEMPLATE, template);
return intent;