Merge "Fix issue #2544466: Car Home brightness icon comes and goes while phone is in car dock in FRE83"

This commit is contained in:
Dianne Hackborn
2010-03-26 00:55:35 -07:00
committed by Android (Google) Code Review
11 changed files with 132 additions and 27 deletions

View File

@@ -30,7 +30,7 @@ interface IUiModeManager {
/**
* Disables the car mode.
*/
void disableCarMode();
void disableCarMode(int flags);
/**
* Return the current running mode.

View File

@@ -116,12 +116,22 @@ public class UiModeManager {
}
/**
* Turn off special mode if currently in car mode.
* 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 void disableCarMode() {
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(int flags) {
if (mService != null) {
try {
mService.disableCarMode();
mService.disableCarMode(flags);
} catch (RemoteException e) {
Log.e(TAG, "disableCarMode: RemoteException", e);
}

View File

@@ -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...