summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús David <jedga_95@outlook.com>2013-01-25 18:48:43 (GMT)
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2013-01-27 05:42:24 (GMT)
commit125ab5aa2a51fb04e1d127e87551533465c14c53 (patch)
tree0c69946842f6366e4677389d5fc6c6a0a4127de7
parent9889f4485e0ecfa2db5d3e1523d17832f008bc1b (diff)
downloadandroid_packages_apps_Trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.zip
android_packages_apps_Trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.tar.gz
android_packages_apps_Trebuchet-125ab5aa2a51fb04e1d127e87551533465c14c53.tar.bz2
Reload launcher on expanded desktop
Change-Id: Ia8a1e61de79e3fa6dbadad826b0bc2844368c86b
-rw-r--r--src/com/cyanogenmod/trebuchet/Launcher.java11
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()