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

Commit 679e1181 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Allow Wear Home app to send wallpaper commands at any time" into oc-wear-dev

parents 4557fb49 5297b37c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -358,7 +358,14 @@ class WallpaperController {

    Bundle sendWindowWallpaperCommand(
            WindowState window, String action, int x, int y, int z, Bundle extras, boolean sync) {
        if (window == mWallpaperTarget || window == mPrevWallpaperTarget) {

        // HACK(ewol): Custom whitelist for Wear Home app, to allow it to update the wallpaper
        // regardless of what window is targeted.
        // http://b/32172459
        final boolean hackWearWhitelisted = (window != null) && (window.mAttrs != null)
                && "com.google.android.wearable.app".equals(window.mAttrs.packageName);

        if (hackWearWhitelisted || window == mWallpaperTarget || window == mPrevWallpaperTarget) {
            boolean doWait = sync;
            for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) {
                final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx);