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

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

Merge "Migrate DisplayContent.mOverlayContainers to DisplayArea"

parents 15c7d145 27284de4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5300,6 +5300,7 @@ package android.window {
    field public static final int FEATURE_SYSTEM_LAST = 10000; // 0x2710
    field public static final int FEATURE_UNDEFINED = -1; // 0xffffffff
    field public static final int FEATURE_VENDOR_FIRST = 10001; // 0x2711
    field public static final int FEATURE_WINDOWED_MAGNIFICATION = 4; // 0x4
    field public static final int FEATURE_WINDOW_TOKENS = 2; // 0x2
  }

+7 −0
Original line number Diff line number Diff line
@@ -60,6 +60,13 @@ public class DisplayAreaOrganizer extends WindowOrganizer {
     */
    public static final int FEATURE_ONE_HANDED = FEATURE_SYSTEM_FIRST + 3;

    /**
     * Display area that can be magnified in
     * {@link Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW}. It contains all windows
     * below {@link WindowManager.LayoutParams#TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY}.
     */
    public static final int FEATURE_WINDOWED_MAGNIFICATION = FEATURE_SYSTEM_FIRST + 4;

    /**
     * The last boundary of display area for system features
     */
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ message DisplayContentProto {
    repeated IdentifierProto opening_apps = 17;
    repeated IdentifierProto closing_apps = 18;
    repeated IdentifierProto changing_apps = 19;
    repeated WindowTokenProto overlay_windows = 20;
    repeated WindowTokenProto overlay_windows = 20 [deprecated=true];
    optional DisplayAreaProto root_display_area = 21;


+0 −18
Original line number Diff line number Diff line
@@ -85,12 +85,6 @@
      "group": "WM_DEBUG_ADD_REMOVE",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-1953668890": {
      "message": "Can't start recents animation, nextAppTransition=%s",
      "level": "DEBUG",
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RecentsAnimation.java"
    },
    "-1949279037": {
      "message": "Attempted to add input method window with bad token %s.  Aborting.",
      "level": "WARN",
@@ -889,12 +883,6 @@
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/ActivityRecord.java"
    },
    "-242787066": {
      "message": "addTaskToRecentsAnimationIfNeeded, control: %s, task: %s, transit: %s",
      "level": "DEBUG",
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "at": "com\/android\/server\/wm\/WindowContainer.java"
    },
    "-198463978": {
      "message": "updateRotationUnchecked: alwaysSendConfiguration=%b forceRelayout=%b",
      "level": "VERBOSE",
@@ -1543,12 +1531,6 @@
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowToken.java"
    },
    "845234215": {
      "message": "App is requesting an orientation, return %d for display id=%d",
      "level": "VERBOSE",
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/DisplayContent.java"
    },
    "853091290": {
      "message": "Moved stack=%s behind stack=%s",
      "level": "DEBUG",
+12 −0
Original line number Diff line number Diff line
@@ -16,10 +16,12 @@

package com.android.server.wm;

import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
import static android.window.DisplayAreaOrganizer.FEATURE_DEFAULT_TASK_CONTAINER;
import static android.window.DisplayAreaOrganizer.FEATURE_ONE_HANDED;
import static android.window.DisplayAreaOrganizer.FEATURE_WINDOWED_MAGNIFICATION;

import android.content.res.Resources;
import android.text.TextUtils;
@@ -88,6 +90,11 @@ public abstract class DisplayAreaPolicy {
     */
    public abstract void addWindow(WindowToken token);

    /**
     * Gets the set of {@link DisplayArea} that are created for the given feature to apply to.
     */
    public abstract List<DisplayArea<? extends WindowContainer>> getDisplayAreas(int featureId);

    /**
     * @return the number of task display areas on the display.
     */
@@ -113,6 +120,11 @@ public abstract class DisplayAreaPolicy {
            final List<TaskDisplayArea> tdaList = new ArrayList<>();
            tdaList.add(defaultTaskDisplayArea);
            return new DisplayAreaPolicyBuilder()
                    .addFeature(new DisplayAreaPolicyBuilder.Feature.Builder(wmService.mPolicy,
                            "WindowedMagnification", FEATURE_WINDOWED_MAGNIFICATION)
                            .upTo(TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY)
                            .except(TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY)
                            .build())
                    .addFeature(new DisplayAreaPolicyBuilder.Feature.Builder(wmService.mPolicy,
                            "OneHanded", FEATURE_ONE_HANDED)
                            .all()
Loading