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

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

Merge "Move system property for Window Extensions to WindowManager"

parents 5d96df4c 0dc85ebd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3294,6 +3294,7 @@ package android.view {

  public interface WindowManager extends android.view.ViewManager {
    method public default int getDisplayImePolicy(int);
    method public static boolean hasWindowExtensionsEnabled();
    method public default void holdLock(android.os.IBinder, int);
    method public default boolean isGlobalKey(int);
    method public default boolean isTaskSnapshotSupported();
+21 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
@@ -1104,6 +1105,26 @@ public interface WindowManager extends ViewManager {
     */
    public static final String PARCEL_KEY_SHORTCUTS_ARRAY = "shortcuts_array";

    /**
     * Whether the device supports the WindowManager Extensions.
     * OEMs can enable this by having their device config to inherit window_extensions.mk, such as:
     * <pre>
     * $(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
     * </pre>
     * @hide
     */
    boolean WINDOW_EXTENSIONS_ENABLED =
            SystemProperties.getBoolean("persist.wm.extensions.enabled", false);

    /**
     * @see #WINDOW_EXTENSIONS_ENABLED
     * @hide
     */
    @TestApi
    static boolean hasWindowExtensionsEnabled() {
        return WINDOW_EXTENSIONS_ENABLED;
    }

    /**
     * Application-level
     * {@link android.content.pm.PackageManager.Property PackageManager.Property}
+1 −1
Original line number Diff line number Diff line
@@ -2159,7 +2159,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        boolean appActivityEmbeddingEnabled = false;
        try {
            appActivityEmbeddingEnabled = WindowManagerService.sWindowExtensionsEnabled
            appActivityEmbeddingEnabled = WindowManager.hasWindowExtensionsEnabled()
                    && mAtmService.mContext.getPackageManager()
                            .getProperty(PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED, packageName)
                            .getBoolean();
+0 −10
Original line number Diff line number Diff line
@@ -442,16 +442,6 @@ public class WindowManagerService extends IWindowManager.Stub
    static final boolean ENABLE_FIXED_ROTATION_TRANSFORM =
            SystemProperties.getBoolean("persist.wm.fixed_rotation_transform", true);

    /**
     * Whether the device supports the WindowManager Extensions.
     * OEMs can enable this by having their device config to inherit window_extensions.mk, such as:
     * <pre>
     * $(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
     * </pre>
     */
    static final boolean sWindowExtensionsEnabled =
            SystemProperties.getBoolean("persist.wm.extensions.enabled", false);

    // Enums for animation scale update types.
    @Retention(RetentionPolicy.SOURCE)
    @IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE})