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

Commit 49bbb76a authored by Timothy Yiu's avatar Timothy Yiu Committed by Android (Google) Code Review
Browse files

Merge "Add API flags for ALWAYS_UPDATE_WALLPAPER" into main

parents c5085b72 9861872f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ package android {
    field public static final String ALLOW_ANY_CODEC_FOR_PLAYBACK = "android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK";
    field public static final String ALLOW_PLACE_IN_MULTI_PANE_SETTINGS = "android.permission.ALLOW_PLACE_IN_MULTI_PANE_SETTINGS";
    field public static final String ALLOW_SLIPPERY_TOUCHES = "android.permission.ALLOW_SLIPPERY_TOUCHES";
    field public static final String ALWAYS_UPDATE_WALLPAPER = "android.permission.ALWAYS_UPDATE_WALLPAPER";
    field @FlaggedApi("com.android.window.flags.always_update_wallpaper_permission") public static final String ALWAYS_UPDATE_WALLPAPER = "android.permission.ALWAYS_UPDATE_WALLPAPER";
    field public static final String AMBIENT_WALLPAPER = "android.permission.AMBIENT_WALLPAPER";
    field public static final String APPROVE_INCIDENT_REPORTS = "android.permission.APPROVE_INCIDENT_REPORTS";
    field public static final String ASSOCIATE_COMPANION_DEVICES = "android.permission.ASSOCIATE_COMPANION_DEVICES";
+8 −0
Original line number Diff line number Diff line
package: "com.android.window.flags"

flag {
    name: "always_update_wallpaper_permission"
    namespace: "wear_frameworks"
    description: "Allow out of focus process to update wallpaper complications"
    bug: "271132915"
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -4065,6 +4065,7 @@
    <!-- Allow apps to always update wallpaper by sending data.
        @SystemApi
        @hide
        @FlaggedApi("com.android.window.flags.always_update_wallpaper_permission")
    -->
    <permission android:name="android.permission.ALWAYS_UPDATE_WALLPAPER"
        android:protectionLevel="internal|role" />
+3 −2
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ import com.android.internal.os.logging.MetricsLoggerWrapper;
import com.android.internal.protolog.common.ProtoLog;
import com.android.server.LocalServices;
import com.android.server.wm.WindowManagerService.H;
import com.android.window.flags.Flags;

import java.io.PrintWriter;
import java.util.Collections;
@@ -166,8 +167,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
        mCanSetUnrestrictedGestureExclusion =
                service.mContext.checkCallingOrSelfPermission(SET_UNRESTRICTED_GESTURE_EXCLUSION)
                        == PERMISSION_GRANTED;
        mCanAlwaysUpdateWallpaper =
                service.mContext.checkCallingOrSelfPermission(ALWAYS_UPDATE_WALLPAPER)
        mCanAlwaysUpdateWallpaper = Flags.alwaysUpdateWallpaperPermission()
                && service.mContext.checkCallingOrSelfPermission(ALWAYS_UPDATE_WALLPAPER)
                        == PERMISSION_GRANTED;
        mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications;
        mDragDropController = mService.mDragDropController;