Skip to content

Commit ddfaa3f

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "Provide a debugging option to force enable wifi display." into jb-mr1-dev
2 parents e6ff478 + bbd28a2 commit ddfaa3f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/java/com/android/server/display/DisplayManagerService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ public final class DisplayManagerService extends IDisplayManager.Stub {
8989
private static final String TAG = "DisplayManagerService";
9090
private static final boolean DEBUG = false;
9191

92+
// When this system property is set to 0, WFD is forcibly disabled on boot.
93+
// When this system property is set to 1, WFD is forcibly enabled on boot.
94+
// Otherwise WFD is enabled according to the value of config_enableWifiDisplay.
95+
private static final String FORCE_WIFI_DISPLAY_ENABLE = "persist.debug.wfd.enable";
96+
9297
private static final String SYSTEM_HEADLESS = "ro.config.headless";
9398
private static final long WAIT_FOR_DEFAULT_DISPLAY_TIMEOUT = 10000;
9499

@@ -499,7 +504,8 @@ private void registerOverlayDisplayAdapterLocked() {
499504

500505
private void registerWifiDisplayAdapterLocked() {
501506
if (mContext.getResources().getBoolean(
502-
com.android.internal.R.bool.config_enableWifiDisplay)) {
507+
com.android.internal.R.bool.config_enableWifiDisplay)
508+
|| SystemProperties.getInt(FORCE_WIFI_DISPLAY_ENABLE, -1) == 1) {
503509
mWifiDisplayAdapter = new WifiDisplayAdapter(
504510
mSyncRoot, mContext, mHandler, mDisplayAdapterListener,
505511
mPersistentDataStore);

0 commit comments

Comments
 (0)