Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a334ed1 authored by lesl's avatar lesl Committed by Les Lee
Browse files

wifi: Add flag FLAG_IMMUTABLE in SAP notification

In S, it requires to specify explicitly either FLAG_MUTABLE
or FLAG_IMMUTABLE when creating a PendingIntent.

The SoftAp Notification is used to notify user the configuration changed.
And it supports to launch Setting page to show the current configuration.
Based on the flag description, the FLAG_MUTABLE should be considered when
the notification need to be used with inline reply or bubbles.
But it is not the use case on SoftAp Notification.
Use FLAG_IMMUTABLE.

Bug: 171719799
Test: Manuel Test
Change-Id: Id3df909f7754931e8018d7b8f6d07aba58158cbe
parent 26ca287d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ public class WifiSoftApConfigChangedNotifier {
    private static PendingIntent getPendingActivity(Context context) {
        Intent intent = new Intent("com.android.settings.WIFI_TETHER_SETTINGS")
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
        return PendingIntent.getActivity(context, 0, intent,
                PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
    }
}