diff options
| author | Sarah Chin <sarahchin@google.com> | 2020-12-17 07:21:39 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-12-17 07:21:39 +0000 |
| commit | 1df823aaf9747eaaaab324e6a6760a8ef3fd4bf6 (patch) | |
| tree | e9bc66309e1bebe35a0cb8bcf6e74ba792577c7c | |
| parent | 82f859838f414677154dd41e2b345195d0ded150 (diff) | |
| parent | aa95da1e19db7bc89bc581b1ba46bd0b63b20aaf (diff) | |
Merge "Move phone ID to extra for action provision" am: fee0474f55 am: aa95da1e19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530760
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I0aaf794caca7c3be0731a2ed7774ec181ffd108a
| -rw-r--r-- | core/java/android/net/ConnectivityManager.java | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/connectivity/NetworkNotificationManager.java | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 1e968721e637..540ea5c159cc 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -3152,9 +3152,9 @@ public class ConnectivityManager { } /** - * Set sign in error notification to visible or in visible + * Set sign in error notification to visible or invisible * - * {@hide} + * @hide * @deprecated Doesn't properly deal with multiple connected networks of the same type. */ @Deprecated diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index 7795ed38a74f..3d71b0a269c9 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -334,7 +334,13 @@ public class NetworkNotificationManager { */ public void setProvNotificationVisible(boolean visible, int id, String action) { if (visible) { - Intent intent = new Intent(action); + // For legacy purposes, action is sent as the action + the phone ID from DcTracker. + // Split the string here and send the phone ID as an extra instead. + String[] splitAction = action.split(":"); + Intent intent = new Intent(splitAction[0]); + try { + intent.putExtra("provision.phone.id", Integer.parseInt(splitAction[1])); + } catch (NumberFormatException ignored) { } PendingIntent pendingIntent = PendingIntent.getBroadcast( mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE); showNotification(id, NotificationType.SIGN_IN, null, null, pendingIntent, false); |
