* commit 'a1240184efd1d4391540a6e3e9cae50d56d05cb2': Fix issue #5433192 and maybe #5433192
This commit is contained in:
@@ -49,6 +49,10 @@ public class CompatModeButton extends ImageView {
|
||||
|
||||
public void refresh() {
|
||||
int mode = mAM.getFrontActivityScreenCompatMode();
|
||||
if (mode == ActivityManager.COMPAT_MODE_UNKNOWN) {
|
||||
// If in an unknown state, don't change.
|
||||
return;
|
||||
}
|
||||
final boolean vis = (mode != ActivityManager.COMPAT_MODE_NEVER
|
||||
&& mode != ActivityManager.COMPAT_MODE_ALWAYS);
|
||||
if (DEBUG) Slog.d(TAG, "compat mode is " + mode + "; icon will " + (vis ? "show" : "hide"));
|
||||
|
||||
@@ -534,6 +534,7 @@ public class TabletStatusBar extends StatusBar implements
|
||||
|
||||
mCompatModeButton = (CompatModeButton) sb.findViewById(R.id.compatModeButton);
|
||||
mCompatModeButton.setOnClickListener(mOnClickListener);
|
||||
mCompatModeButton.setVisibility(View.GONE);
|
||||
|
||||
// for redirecting errant bar taps to the IME
|
||||
mFakeSpaceBar = sb.findViewById(R.id.fake_space_bar);
|
||||
|
||||
@@ -40,7 +40,6 @@ import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Binder;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
@@ -72,6 +71,7 @@ import android.util.Slog;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Gravity;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
import android.view.IApplicationToken;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.InputChannel;
|
||||
import android.view.InputDevice;
|
||||
@@ -343,6 +343,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
|
||||
// The last window we were told about in focusChanged.
|
||||
WindowState mFocusedWindow;
|
||||
IApplicationToken mFocusedApp;
|
||||
|
||||
private final InputHandler mPointerLocationInputHandler = new BaseInputHandler() {
|
||||
@Override
|
||||
@@ -3813,11 +3814,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
int diff = visibility ^ mLastSystemUiFlags;
|
||||
final boolean needsMenu = (mFocusedWindow.getAttrs().flags
|
||||
& WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0;
|
||||
if (diff == 0 && mLastFocusNeedsMenu == needsMenu) {
|
||||
if (diff == 0 && mLastFocusNeedsMenu == needsMenu
|
||||
&& mFocusedApp == mFocusedWindow.getAppToken()) {
|
||||
return 0;
|
||||
}
|
||||
mLastSystemUiFlags = visibility;
|
||||
mLastFocusNeedsMenu = needsMenu;
|
||||
mFocusedApp = mFocusedWindow.getAppToken();
|
||||
mHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
if (mStatusBarService == null) {
|
||||
|
||||
Reference in New Issue
Block a user