Move system property for Window Extensions to WindowManager
So that it can be reference outside of the wm/ directory, and used in CTS. Bug: 235797785 Test: refactor only Change-Id: I837ecf978bb42b7da45dd5afdc7d7de0b4d2914e
This commit is contained in:
@@ -3263,6 +3263,7 @@ package android.view {
|
|||||||
|
|
||||||
public interface WindowManager extends android.view.ViewManager {
|
public interface WindowManager extends android.view.ViewManager {
|
||||||
method public default int getDisplayImePolicy(int);
|
method public default int getDisplayImePolicy(int);
|
||||||
|
method public static boolean hasWindowExtensionsEnabled();
|
||||||
method public default void holdLock(android.os.IBinder, int);
|
method public default void holdLock(android.os.IBinder, int);
|
||||||
method public default boolean isGlobalKey(int);
|
method public default boolean isGlobalKey(int);
|
||||||
method public default boolean isTaskSnapshotSupported();
|
method public default boolean isTaskSnapshotSupported();
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ import android.os.Bundle;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
import android.os.SystemProperties;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.proto.ProtoOutputStream;
|
import android.util.proto.ProtoOutputStream;
|
||||||
@@ -1103,6 +1104,26 @@ public interface WindowManager extends ViewManager {
|
|||||||
*/
|
*/
|
||||||
public static final String PARCEL_KEY_SHORTCUTS_ARRAY = "shortcuts_array";
|
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
|
* Application-level
|
||||||
* {@link android.content.pm.PackageManager.Property PackageManager.Property}
|
* {@link android.content.pm.PackageManager.Property PackageManager.Property}
|
||||||
|
|||||||
@@ -2149,7 +2149,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
|
|
||||||
boolean appActivityEmbeddingEnabled = false;
|
boolean appActivityEmbeddingEnabled = false;
|
||||||
try {
|
try {
|
||||||
appActivityEmbeddingEnabled = WindowManagerService.sWindowExtensionsEnabled
|
appActivityEmbeddingEnabled = WindowManager.hasWindowExtensionsEnabled()
|
||||||
&& mAtmService.mContext.getPackageManager()
|
&& mAtmService.mContext.getPackageManager()
|
||||||
.getProperty(PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED, packageName)
|
.getProperty(PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED, packageName)
|
||||||
.getBoolean();
|
.getBoolean();
|
||||||
|
|||||||
@@ -441,16 +441,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
static final boolean ENABLE_FIXED_ROTATION_TRANSFORM =
|
static final boolean ENABLE_FIXED_ROTATION_TRANSFORM =
|
||||||
SystemProperties.getBoolean("persist.wm.fixed_rotation_transform", true);
|
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.
|
// Enums for animation scale update types.
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE})
|
@IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE})
|
||||||
|
|||||||
Reference in New Issue
Block a user