Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +19 −0 Original line number Original line Diff line number Diff line Loading @@ -297,6 +297,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSystemReady; boolean mSystemReady; boolean mSystemBooted; boolean mSystemBooted; boolean mHdmiPlugged; boolean mHdmiPlugged; IUiModeManager mUiModeManager; int mUiMode; int mUiMode; int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED; int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED; int mLidOpenRotation; int mLidOpenRotation; Loading Loading @@ -4756,6 +4757,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null); mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null); mKeyguardDelegate.onSystemReady(); mKeyguardDelegate.onSystemReady(); updateUiMode(); synchronized (mLock) { synchronized (mLock) { updateOrientationListenerLp(); updateOrientationListenerLp(); mSystemReady = true; mSystemReady = true; Loading Loading @@ -4932,6 +4934,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } } void updateUiMode() { if (mUiModeManager == null) { mUiModeManager = IUiModeManager.Stub.asInterface( ServiceManager.getService(Context.UI_MODE_SERVICE)); } try { mUiMode = mUiModeManager.getCurrentModeType(); } catch (RemoteException e) { } } void updateRotation(boolean alwaysSendConfiguration) { void updateRotation(boolean alwaysSendConfiguration) { try { try { //set orientation on WindowManager //set orientation on WindowManager Loading Loading @@ -4977,6 +4990,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (ENABLE_DESK_DOCK_HOME_CAPTURE) { if (ENABLE_DESK_DOCK_HOME_CAPTURE) { intent = mDeskDockIntent; intent = mDeskDockIntent; } } } else if (mUiMode == Configuration.UI_MODE_TYPE_WATCH && (mDockMode == Intent.EXTRA_DOCK_STATE_DESK || mDockMode == Intent.EXTRA_DOCK_STATE_HE_DESK || mDockMode == Intent.EXTRA_DOCK_STATE_LE_DESK)) { // Always launch dock home from home when watch is docked, if it exists. intent = mDeskDockIntent; } } if (intent == null) { if (intent == null) { Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +19 −0 Original line number Original line Diff line number Diff line Loading @@ -297,6 +297,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSystemReady; boolean mSystemReady; boolean mSystemBooted; boolean mSystemBooted; boolean mHdmiPlugged; boolean mHdmiPlugged; IUiModeManager mUiModeManager; int mUiMode; int mUiMode; int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED; int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED; int mLidOpenRotation; int mLidOpenRotation; Loading Loading @@ -4756,6 +4757,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null); mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null); mKeyguardDelegate.onSystemReady(); mKeyguardDelegate.onSystemReady(); updateUiMode(); synchronized (mLock) { synchronized (mLock) { updateOrientationListenerLp(); updateOrientationListenerLp(); mSystemReady = true; mSystemReady = true; Loading Loading @@ -4932,6 +4934,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } } void updateUiMode() { if (mUiModeManager == null) { mUiModeManager = IUiModeManager.Stub.asInterface( ServiceManager.getService(Context.UI_MODE_SERVICE)); } try { mUiMode = mUiModeManager.getCurrentModeType(); } catch (RemoteException e) { } } void updateRotation(boolean alwaysSendConfiguration) { void updateRotation(boolean alwaysSendConfiguration) { try { try { //set orientation on WindowManager //set orientation on WindowManager Loading Loading @@ -4977,6 +4990,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (ENABLE_DESK_DOCK_HOME_CAPTURE) { if (ENABLE_DESK_DOCK_HOME_CAPTURE) { intent = mDeskDockIntent; intent = mDeskDockIntent; } } } else if (mUiMode == Configuration.UI_MODE_TYPE_WATCH && (mDockMode == Intent.EXTRA_DOCK_STATE_DESK || mDockMode == Intent.EXTRA_DOCK_STATE_HE_DESK || mDockMode == Intent.EXTRA_DOCK_STATE_LE_DESK)) { // Always launch dock home from home when watch is docked, if it exists. intent = mDeskDockIntent; } } if (intent == null) { if (intent == null) { Loading