diff options
author | Jesús David <jedga_95@outlook.com> | 2013-01-25 13:48:43 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2013-01-26 21:42:24 -0800 |
commit | 125ab5aa2a51fb04e1d127e87551533465c14c53 (patch) | |
tree | 0c69946842f6366e4677389d5fc6c6a0a4127de7 /src/com/cyanogenmod/trebuchet/Launcher.java | |
parent | 9889f4485e0ecfa2db5d3e1523d17832f008bc1b (diff) | |
download | packages_apps_trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.zip packages_apps_trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.tar.gz packages_apps_trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.tar.bz2 |
Reload launcher on expanded desktop
Change-Id: Ia8a1e61de79e3fa6dbadad826b0bc2844368c86b
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Launcher.java')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Launcher.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java index 454dbb0..bae9389 100644 --- a/src/com/cyanogenmod/trebuchet/Launcher.java +++ b/src/com/cyanogenmod/trebuchet/Launcher.java @@ -349,6 +349,17 @@ public final class Launcher extends Activity @Override protected void onCreate(Bundle savedInstanceState) { + // Listen for expanded desktop + getContentResolver().registerContentObserver( + Settings.System.getUriFor(Settings.System.EXPANDED_DESKTOP_STATE), + false, new ContentObserver(new Handler()) { + @Override + public void onChange(boolean selfChange) { + // Refresh launcher content + finish(); + } + }); + if (DEBUG_STRICT_MODE) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() |