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

Commit 9cbc80a3 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Disable WM Extensions on Watch" into main

parents 54a8836b 719b1a75
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -104,6 +104,7 @@ import android.content.ClipData;
import android.content.ComponentName;
import android.content.ComponentName;
import android.content.Context;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Bitmap;
import android.graphics.PixelFormat;
import android.graphics.PixelFormat;
@@ -1490,7 +1491,13 @@ public interface WindowManager extends ViewManager {
        }
        }


        try {
        try {
            return ActivityTaskManager.supportsMultiWindow(ActivityThread.currentApplication());
            final Context context = ActivityThread.currentApplication();
            if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
                // Watch supports multi-window to present essential system UI, but it doesn't need
                // WM Extensions.
                return false;
            }
            return ActivityTaskManager.supportsMultiWindow(context);
        } catch (Exception e) {
        } catch (Exception e) {
            // In case the PackageManager is not set up correctly in test.
            // In case the PackageManager is not set up correctly in test.
            Log.e("WindowManager", "Unable to read if the device supports multi window", e);
            Log.e("WindowManager", "Unable to read if the device supports multi window", e);