Merge "Adding WINDOW_MANAGER_NATIVE_BOOT and window_manager_use_blast_adapter flags"

This commit is contained in:
Valerie Hau
2020-01-21 22:20:04 +00:00
committed by Android (Google) Code Review
4 changed files with 18 additions and 1 deletions

View File

@@ -332,6 +332,15 @@ public final class DeviceConfig {
*/
public static final String NAMESPACE_WINDOW_MANAGER = "window_manager";
/**
* Namespace for window manager features accessible by native code and
* loaded once per boot.
*
* @hide
*/
@SystemApi
public static final String NAMESPACE_WINDOW_MANAGER_NATIVE_BOOT = "window_manager_native_boot";
/**
* List of namespaces which can be read without READ_DEVICE_CONFIG permission
*

View File

@@ -29,6 +29,7 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.provider.DeviceConfig;
import android.util.AndroidRuntimeException;
import android.util.ArraySet;
import android.util.Log;
@@ -56,11 +57,16 @@ import java.util.ArrayList;
public final class WindowManagerGlobal {
private static final String TAG = "WindowManager";
private static final String WM_USE_BLAST_ADAPTER_FLAG = "wm_use_blast_adapter";
/**
* This flag controls whether ViewRootImpl will utilize the Blast Adapter
* to send buffer updates to SurfaceFlinger
*/
public static final boolean USE_BLAST_ADAPTER = false;
public static final boolean USE_BLAST_ADAPTER =
SystemProperties.getBoolean(String.join(".", "persist.device_config",
DeviceConfig.NAMESPACE_WINDOW_MANAGER_NATIVE_BOOT,
WM_USE_BLAST_ADAPTER_FLAG), false);
/**
* The user is navigating with keys (not the touch screen), so