标签:mod frame void monit get context callbacks arraylist ansi
--- a/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2863,7 +2863,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public int adjustSystemUiVisibilityLw(int visibility) { - mStatusBarController.adjustSystemUiVisibilityLw(mLastSystemUiFlags, visibility); + if(Settings.System.getInt(mContext.getContentResolver(),"factorytest.touch.mode",0) == 0){ + mStatusBarController.adjustSystemUiVisibilityLw(mLastSystemUiFlags, visibility); + } mNavigationBarController.adjustSystemUiVisibilityLw(mLastSystemUiFlags, visibility); // Reset any bits in mForceClearingStatusBarVisibility that
--- a/huaqin/source/packages/FactoryKitTest/src/com/android/huaqin/factory/TestTouchPanelLine2.java +++ b/huaqin/source/packages/FactoryKitTest/src/com/android/huaqin/factory/TestTouchPanelLine2.java @@ -32,6 +32,8 @@ import android.view.WindowManager; import java.util.ArrayList; import java.util.List; +import android.provider.Settings; +import android.app.StatusBarManager; public class TestTouchPanelLine2 extends Activity { private static final String TAG = "TestTouchPanelLine"; @@ -54,6 +56,7 @@ public class TestTouchPanelLine2 extends Activity { private static final int MSG_TEST_PANEL_NEXT_ITEM = 100; private static final int MSG_TEST_PANEL_START = 101; private static final int MSG_TEST_PANEL_STOP = 102; + private StatusBarManager mStatusBarManager; private Handler mInHandler = new Handler() { @Override @@ -94,6 +97,12 @@ public class TestTouchPanelLine2 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -141,8 +150,22 @@ public class TestTouchPanelLine2 extends Activity { .obtainMessage(FactoryTestMessage.MSG_OPEN_UI_OK); msg.arg1 = (int) ID; mOutHandler.sendMessage(msg); + mStatusBarManager = (StatusBarManager) this.getSystemService(Context.STATUS_BAR_SERVICE); + int state= StatusBarManager.DISABLE_EXPAND; + state |= StatusBarManager.DISABLE_NOTIFICATION_ICONS; + state |= StatusBarManager.DISABLE_SYSTEM_INFO; + mStatusBarManager.disable(state); } + @Override + protected void onPause() { + int state = StatusBarManager.DISABLE_NONE; + mStatusBarManager.disable(state); + super.onPause(); + } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // 是否触发按键为back键
public static final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000; + /** + * @hide + * + * NOTE: Flag for {@link #setSystemUiVisibility(int)}: It help user to disable transient + * status bar triggered by gesture + */ + public static final int SYSTEM_UI_FLAG_IMMERSIVE_GESTURE_ISOLATED = 0x00002000;
// monitor for system gestures mSystemGestures = new SystemGesturesPointerEventListener(context, new SystemGesturesPointerEventListener.Callbacks() { @Override public void onSwipeFromTop() { + if (isGestureIsolated()) + return; if (mStatusBar != null) { requestTransientBars(mStatusBar); } } @Override public void onSwipeFromBottom() { + if (isGestureIsolated()) + return; if (mNavigationBar != null && mNavigationBarOnBottom) { requestTransientBars(mNavigationBar); } } @Override public void onSwipeFromRight() { + if (isGestureIsolated()) + return; if (mNavigationBar != null && !mNavigationBarOnBottom) { requestTransientBars(mNavigationBar); } } @Override public void onDebug() { // no-op } + private boolean isGestureIsolated() { + WindowState win = mFocusedWindow != null ? mFocusedWindow : mTopFullscreenOpaqueWindowState; + if (win != null && (win.getSystemUiVisibility() & View.SYSTEM_UI_FLAG_IMMERSIVE_GESTURE_ISOLATED) != 0) + return true; + else + return false; + } });
标签:mod frame void monit get context callbacks arraylist ansi
原文地址:http://www.cnblogs.com/wzzkaifa/p/6755640.html