Merge "Replace PendingIntent @hide APIs" am: 1cec9a2671 am: 97adf1f334
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456121 Change-Id: I18693b621bcae7a011719324bd8bede302d22efb
This commit is contained in:
@@ -3998,13 +3998,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
settingsPkgName + ".wifi.WifiNoInternetDialog");
|
||||
}
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivityAsUser(
|
||||
mContext,
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(
|
||||
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
|
||||
0 /* requestCode */,
|
||||
intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE,
|
||||
null /* options */,
|
||||
UserHandle.CURRENT);
|
||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
mNotifier.showNotification(nai.network.netId, type, nai, null, pendingIntent, highPriority);
|
||||
}
|
||||
|
||||
@@ -159,9 +159,11 @@ public class LingerMonitor {
|
||||
|
||||
@VisibleForTesting
|
||||
protected PendingIntent createNotificationIntent() {
|
||||
return PendingIntent.getActivityAsUser(mContext, 0 /* requestCode */, CELLULAR_SETTINGS,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE,
|
||||
null /* options */, UserHandle.CURRENT);
|
||||
return PendingIntent.getActivity(
|
||||
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
|
||||
0 /* requestCode */,
|
||||
CELLULAR_SETTINGS,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
// Removes any notification that was put up as a result of switching to nai.
|
||||
|
||||
@@ -1969,8 +1969,9 @@ public class Vpn {
|
||||
*/
|
||||
public PendingIntent pendingIntentGetActivityAsUser(
|
||||
Intent intent, int flags, UserHandle user) {
|
||||
return PendingIntent.getActivityAsUser(mContext, 0 /*request*/, intent, flags,
|
||||
null /*options*/, user);
|
||||
return PendingIntent.getActivity(
|
||||
mContext.createContextAsUser(user, 0 /* flags */), 0 /* requestCode */,
|
||||
intent, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user