summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-08 15:49:04 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-08 15:49:04 -0800
commit47b8f52eb9a07c6b789b7b507a74a1f02e37e3a2 (patch)
treef30cc77d291d43347f7e73acb914d949a51e1956 /core
parent94720d7ec40d2b5ee200d95a46588cdb0fb30e66 (diff)
parent9d0718042f7c0a50d825c621f82ce9a92071f07a (diff)
downloadframeworks_base-47b8f52eb9a07c6b789b7b507a74a1f02e37e3a2.zip
frameworks_base-47b8f52eb9a07c6b789b7b507a74a1f02e37e3a2.tar.gz
frameworks_base-47b8f52eb9a07c6b789b7b507a74a1f02e37e3a2.tar.bz2
Merge "Fix issues #3257701 and #3267312"
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/Activity.java3
-rw-r--r--core/java/android/app/FragmentManager.java23
-rw-r--r--core/java/android/preference/PreferenceActivity.java2
3 files changed, 27 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index d679ef6..aaebbd0 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1403,6 +1403,8 @@ public class Activity extends ContextThemeWrapper
public void onConfigurationChanged(Configuration newConfig) {
mCalled = true;
+ mFragments.dispatchConfigurationChanged(newConfig);
+
if (mWindow != null) {
// Pass the configuration changed event to the window
mWindow.onConfigurationChanged(newConfig);
@@ -1566,6 +1568,7 @@ public class Activity extends ContextThemeWrapper
public void onLowMemory() {
mCalled = true;
+ mFragments.dispatchLowMemory();
}
/**
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index fbad2fe..1b2d4df 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -19,6 +19,7 @@ package android.app;
import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
+import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.os.Handler;
@@ -1415,6 +1416,28 @@ final class FragmentManagerImpl extends FragmentManager {
mActivity = null;
}
+ public void dispatchConfigurationChanged(Configuration newConfig) {
+ if (mActive != null) {
+ for (int i=0; i<mAdded.size(); i++) {
+ Fragment f = mAdded.get(i);
+ if (f != null) {
+ f.onConfigurationChanged(newConfig);
+ }
+ }
+ }
+ }
+
+ public void dispatchLowMemory() {
+ if (mActive != null) {
+ for (int i=0; i<mAdded.size(); i++) {
+ Fragment f = mAdded.get(i);
+ if (f != null) {
+ f.onLowMemory();
+ }
+ }
+ }
+ }
+
public boolean dispatchCreateOptionsMenu(Menu menu, MenuInflater inflater) {
boolean show = false;
ArrayList<Fragment> newMenus = null;
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 7492c96..41f0d10 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -394,7 +394,7 @@ public abstract class PreferenceActivity extends ListActivity implements
if (summaryRes != 0) {
return res.getText(summaryRes);
}
- return title;
+ return summary;
}
/**