summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-05-23 16:45:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-05-23 16:45:36 +0000
commit36faf14d346854866b4ca4d3e165ed46803ec0a0 (patch)
tree19fe348744e8fac6bc7f88f4eaa61d3c3afd023f /src/com/android
parentf6f526d7ec8657fc5e76dbe5ee08c4c2717376d8 (diff)
parente13d4645397fa6d23e86e22d4849eb3e51fd0766 (diff)
downloadandroid_packages_apps_Trebuchet-36faf14d346854866b4ca4d3e165ed46803ec0a0.tar.gz
android_packages_apps_Trebuchet-36faf14d346854866b4ca4d3e165ed46803ec0a0.tar.bz2
android_packages_apps_Trebuchet-36faf14d346854866b4ca4d3e165ed46803ec0a0.zip
Merge "Calling recreate() instead of finish() so that the activity life cycle is handled properly" into ub-launcher3-dorval-polish
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher3/Launcher.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index d3b4c949a..5fe6c1428 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -4140,9 +4140,8 @@ public class Launcher extends BaseActivity
public void onSharedPreferenceChanged(
SharedPreferences sharedPreferences, String key) {
if (Utilities.ALLOW_ROTATION_PREFERENCE_KEY.equals(key)) {
- // Finish this instance of the activity. When the activity is recreated,
- // it will initialize the rotation preference again.
- finish();
+ // Recreate the activity so that it initializes the rotation preference again.
+ recreate();
}
}
}