Merge "Replace PendingIntent @hide APIs"
This commit is contained in:
@@ -3998,13 +3998,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
settingsPkgName + ".wifi.WifiNoInternetDialog");
|
settingsPkgName + ".wifi.WifiNoInternetDialog");
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivityAsUser(
|
PendingIntent pendingIntent = PendingIntent.getActivity(
|
||||||
mContext,
|
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
|
||||||
0 /* requestCode */,
|
0 /* requestCode */,
|
||||||
intent,
|
intent,
|
||||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE,
|
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
null /* options */,
|
|
||||||
UserHandle.CURRENT);
|
|
||||||
|
|
||||||
mNotifier.showNotification(nai.network.netId, type, nai, null, pendingIntent, highPriority);
|
mNotifier.showNotification(nai.network.netId, type, nai, null, pendingIntent, highPriority);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,9 +159,11 @@ public class LingerMonitor {
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
protected PendingIntent createNotificationIntent() {
|
protected PendingIntent createNotificationIntent() {
|
||||||
return PendingIntent.getActivityAsUser(mContext, 0 /* requestCode */, CELLULAR_SETTINGS,
|
return PendingIntent.getActivity(
|
||||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE,
|
mContext.createContextAsUser(UserHandle.CURRENT, 0 /* flags */),
|
||||||
null /* options */, UserHandle.CURRENT);
|
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.
|
// Removes any notification that was put up as a result of switching to nai.
|
||||||
|
|||||||
Reference in New Issue
Block a user