Skip to content

Commit 0d094ad

Browse files
Sarah ChinAndroid (Google) Code Review
authored andcommitted
Merge "Move phone ID to extra for action provision" into rvc-qpr-dev
2 parents 0c73e5b + 4d810d4 commit 0d094ad

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

core/java/android/net/ConnectivityManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,9 +3115,9 @@ public String getMobileProvisioningUrl() {
31153115
}
31163116

31173117
/**
3118-
* Set sign in error notification to visible or in visible
3118+
* Set sign in error notification to visible or invisible
31193119
*
3120-
* {@hide}
3120+
* @hide
31213121
* @deprecated Doesn't properly deal with multiple connected networks of the same type.
31223122
*/
31233123
@Deprecated

services/core/java/com/android/server/connectivity/NetworkNotificationManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,13 @@ public void clearNotification(int id) {
324324
*/
325325
public void setProvNotificationVisible(boolean visible, int id, String action) {
326326
if (visible) {
327-
Intent intent = new Intent(action);
327+
// For legacy purposes, action is sent as the action + the phone ID from DcTracker.
328+
// Split the string here and send the phone ID as an extra instead.
329+
String[] splitAction = action.split(":");
330+
Intent intent = new Intent(splitAction[0]);
331+
try {
332+
intent.putExtra("provision.phone.id", Integer.parseInt(splitAction[1]));
333+
} catch (NumberFormatException ignored) { }
328334
PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
329335
showNotification(id, NotificationType.SIGN_IN, null, null, pendingIntent, false);
330336
} else {

0 commit comments

Comments
 (0)