Skip to content

Commit

Permalink
Disable Immersive Messages [2/2]
Browse files Browse the repository at this point in the history
Ported to L by Deadman96385

Based off Xposed module by GermainZ

https://github.com/GermainZ/ImmersiveModeDontPanic

Change-Id: I4835cac08a9e525ec15aa4d1ee84329970ec6a72
  • Loading branch information
Jmz authored and deadman96385 committed Nov 13, 2014
1 parent afc4917 commit a33e2c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
6 changes: 6 additions & 0 deletions core/java/android/provider/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,12 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
*/
public static final String SHOW_TOUCHES = "show_touches";

/**
* Disable Immersive Message
* @hide
*/
public static final String DISABLE_IMMERSIVE_MESSAGE = "disable_immersive_message";

/**
* Log raw orientation data from
* {@link com.android.internal.policy.impl.WindowOrientationListener} for use with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,21 @@ private final class H extends Handler {

@Override
public void handleMessage(Message msg) {
switch(msg.what) {
case SHOW:
handleShow();
break;
case HIDE:
handleHide();
break;
case PANIC:
handlePanic();
break;
if (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.DISABLE_IMMERSIVE_MESSAGE, 0) != 1) {
switch(msg.what) {
case SHOW:
handleShow();
break;
case HIDE:
handleHide();
break;
case PANIC:
handlePanic();
break;
}
} else {
handleHide();
}
}
}
Expand Down

0 comments on commit a33e2c4

Please sign in to comment.