Merge "Move phone ID to extra for action provision" am: 9d7a954112
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530760 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idd950c7615945334cbf932beed42d20c41e968c3
This commit is contained in:
@@ -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 Doesn't properly deal with multiple connected networks of the same type.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -334,7 +334,13 @@ public class NetworkNotificationManager {
|
|||||||
*/
|
*/
|
||||||
public void setProvNotificationVisible(boolean visible, int id, String action) {
|
public void setProvNotificationVisible(boolean visible, int id, String action) {
|
||||||
if (visible) {
|
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(
|
PendingIntent pendingIntent = PendingIntent.getBroadcast(
|
||||||
mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE);
|
mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
showNotification(id, NotificationType.SIGN_IN, null, null, pendingIntent, false);
|
showNotification(id, NotificationType.SIGN_IN, null, null, pendingIntent, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user