diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-11-05 13:31:42 -0800 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-11-05 13:33:27 -0800 |
commit | ef1e404cfa1227e309786675a6026dec842b5ab1 (patch) | |
tree | b06c8c3fcfab60afcb925148f862883151b09fd2 | |
parent | dac50ad01eee55ff85c0ca0854310a0b22b9d3b2 (diff) | |
download | android_packages_apps_Gallery2-ef1e404cfa1227e309786675a6026dec842b5ab1.tar.gz android_packages_apps_Gallery2-ef1e404cfa1227e309786675a6026dec842b5ab1.tar.bz2 android_packages_apps_Gallery2-ef1e404cfa1227e309786675a6026dec842b5ab1.zip |
Load correct localized album names after language change
Bug: 7459805
Change-Id: I484ffea5b07488ffdda2e265c4efa32a3333ea03
-rw-r--r-- | src/com/android/gallery3d/data/LocalAlbum.java | 4 | ||||
-rw-r--r-- | src/com/android/gallery3d/data/LocalMergeAlbum.java | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/data/LocalAlbum.java b/src/com/android/gallery3d/data/LocalAlbum.java index e05aac01b..6c5feb5c8 100644 --- a/src/com/android/gallery3d/data/LocalAlbum.java +++ b/src/com/android/gallery3d/data/LocalAlbum.java @@ -61,7 +61,7 @@ public class LocalAlbum extends MediaSet { mApplication = application; mResolver = application.getContentResolver(); mBucketId = bucketId; - mName = getLocalizedName(application.getResources(), bucketId, name); + mName = name; mIsImage = isImage; if (isImage) { @@ -245,7 +245,7 @@ public class LocalAlbum extends MediaSet { @Override public String getName() { - return mName; + return getLocalizedName(mApplication.getResources(), mBucketId, mName); } @Override diff --git a/src/com/android/gallery3d/data/LocalMergeAlbum.java b/src/com/android/gallery3d/data/LocalMergeAlbum.java index cbaf82fff..f0b5e5726 100644 --- a/src/com/android/gallery3d/data/LocalMergeAlbum.java +++ b/src/com/android/gallery3d/data/LocalMergeAlbum.java @@ -41,7 +41,6 @@ public class LocalMergeAlbum extends MediaSet implements ContentListener { private final Comparator<MediaItem> mComparator; private final MediaSet[] mSources; - private String mName; private FetchCache[] mFetcher; private int mSupportedOperation; private int mBucketId; @@ -54,7 +53,6 @@ public class LocalMergeAlbum extends MediaSet implements ContentListener { super(path, INVALID_DATA_VERSION); mComparator = comparator; mSources = sources; - mName = sources.length == 0 ? "" : sources[0].getName(); mBucketId = bucketId; for (MediaSet set : mSources) { set.addContentListener(this); @@ -82,7 +80,6 @@ public class LocalMergeAlbum extends MediaSet implements ContentListener { mSupportedOperation = supported; mIndex.clear(); mIndex.put(0, new int[mSources.length]); - mName = mSources.length == 0 ? "" : mSources[0].getName(); } private void invalidateCache() { @@ -111,7 +108,7 @@ public class LocalMergeAlbum extends MediaSet implements ContentListener { @Override public String getName() { - return mName; + return mSources.length == 0 ? "" : mSources[0].getName(); } @Override |