Loading api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -25508,6 +25508,8 @@ deprecated="not deprecated" visibility="public" > <parameter name="flags" type="int"> </parameter> </method> <method name="getCurrentModeType" return="int" Loading Loading @@ -25584,6 +25586,17 @@ visibility="public" > </field> <field name="DISABLE_CAR_MODE_GO_HOME" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_NIGHT_AUTO" type="int" transient="false" core/java/android/app/IUiModeManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ interface IUiModeManager { /** * Disables the car mode. */ void disableCarMode(); void disableCarMode(int flags); /** * Return the current running mode. Loading core/java/android/app/UiModeManager.java +12 −2 Original line number Diff line number Diff line Loading @@ -115,13 +115,23 @@ public class UiModeManager { ServiceManager.getService(Context.UI_MODE_SERVICE)); } /** * Flag for use with {@link #disableCarMode(int)}: go to the normal * home activity as part of the disable. Disabling this way ensures * a clean transition between the current activity (in car mode) and * the original home activity (which was typically last running without * being in car mode). */ public static final int DISABLE_CAR_MODE_GO_HOME = 0x0001; /** * Turn off special mode if currently in car mode. * @param flags May be 0 or {@link #DISABLE_CAR_MODE_GO_HOME}. */ public void disableCarMode() { public void disableCarMode(int flags) { if (mService != null) { try { mService.disableCarMode(); mService.disableCarMode(flags); } catch (RemoteException e) { Log.e(TAG, "disableCarMode: RemoteException", e); } Loading core/java/android/view/ViewRoot.java +2 −1 Original line number Diff line number Diff line Loading @@ -1855,7 +1855,8 @@ public final class ViewRoot extends Handler implements ViewParent, if (mWinFrame.width() == msg.arg1 && mWinFrame.height() == msg.arg2 && mPendingContentInsets.equals(ri.coveredInsets) && mPendingVisibleInsets.equals(ri.visibleInsets)) { && mPendingVisibleInsets.equals(ri.visibleInsets) && ((ResizedInfo)msg.obj).newConfig == null) { break; } // fall through... Loading core/java/com/android/internal/app/DisableCarModeActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.internal.app; import android.app.Activity; import android.app.IUiModeManager; import android.app.UiModeManager; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -32,7 +33,7 @@ public class DisableCarModeActivity extends Activity { try { IUiModeManager uiModeManager = IUiModeManager.Stub.asInterface( ServiceManager.getService("uimode")); uiModeManager.disableCarMode(); uiModeManager.disableCarMode(UiModeManager.DISABLE_CAR_MODE_GO_HOME); } catch (RemoteException e) { Log.e(TAG, "Failed to disable car mode", e); } Loading Loading
api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -25508,6 +25508,8 @@ deprecated="not deprecated" visibility="public" > <parameter name="flags" type="int"> </parameter> </method> <method name="getCurrentModeType" return="int" Loading Loading @@ -25584,6 +25586,17 @@ visibility="public" > </field> <field name="DISABLE_CAR_MODE_GO_HOME" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_NIGHT_AUTO" type="int" transient="false"
core/java/android/app/IUiModeManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ interface IUiModeManager { /** * Disables the car mode. */ void disableCarMode(); void disableCarMode(int flags); /** * Return the current running mode. Loading
core/java/android/app/UiModeManager.java +12 −2 Original line number Diff line number Diff line Loading @@ -115,13 +115,23 @@ public class UiModeManager { ServiceManager.getService(Context.UI_MODE_SERVICE)); } /** * Flag for use with {@link #disableCarMode(int)}: go to the normal * home activity as part of the disable. Disabling this way ensures * a clean transition between the current activity (in car mode) and * the original home activity (which was typically last running without * being in car mode). */ public static final int DISABLE_CAR_MODE_GO_HOME = 0x0001; /** * Turn off special mode if currently in car mode. * @param flags May be 0 or {@link #DISABLE_CAR_MODE_GO_HOME}. */ public void disableCarMode() { public void disableCarMode(int flags) { if (mService != null) { try { mService.disableCarMode(); mService.disableCarMode(flags); } catch (RemoteException e) { Log.e(TAG, "disableCarMode: RemoteException", e); } Loading
core/java/android/view/ViewRoot.java +2 −1 Original line number Diff line number Diff line Loading @@ -1855,7 +1855,8 @@ public final class ViewRoot extends Handler implements ViewParent, if (mWinFrame.width() == msg.arg1 && mWinFrame.height() == msg.arg2 && mPendingContentInsets.equals(ri.coveredInsets) && mPendingVisibleInsets.equals(ri.visibleInsets)) { && mPendingVisibleInsets.equals(ri.visibleInsets) && ((ResizedInfo)msg.obj).newConfig == null) { break; } // fall through... Loading
core/java/com/android/internal/app/DisableCarModeActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.internal.app; import android.app.Activity; import android.app.IUiModeManager; import android.app.UiModeManager; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -32,7 +33,7 @@ public class DisableCarModeActivity extends Activity { try { IUiModeManager uiModeManager = IUiModeManager.Stub.asInterface( ServiceManager.getService("uimode")); uiModeManager.disableCarMode(); uiModeManager.disableCarMode(UiModeManager.DISABLE_CAR_MODE_GO_HOME); } catch (RemoteException e) { Log.e(TAG, "Failed to disable car mode", e); } Loading