aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2014-09-23 22:25:01 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-09-23 22:25:01 (GMT)
commitd9a7105db1f9e5283ee49b6886d4f8e0beb9484b (patch)
tree94038f924dee690236b0d7e96269523e55ce98f2
parent22ef6f27c736b038a60a7a846082bb631dcca94d (diff)
parent7df02080e5a533d95dff00695d6945495ea1ea66 (diff)
downloadandroid_packages_wallpapers_PhotoPhase-d9a7105db1f9e5283ee49b6886d4f8e0beb9484b.zip
android_packages_wallpapers_PhotoPhase-d9a7105db1f9e5283ee49b6886d4f8e0beb9484b.tar.gz
android_packages_wallpapers_PhotoPhase-d9a7105db1f9e5283ee49b6886d4f8e0beb9484b.tar.bz2
Merge "photophase: prevent user to operation while album adapter is still in load progress" into cm-11.0
-rw-r--r--src/org/cyanogenmod/wallpapers/photophase/preferences/ChoosePicturesFragment.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/preferences/ChoosePicturesFragment.java b/src/org/cyanogenmod/wallpapers/photophase/preferences/ChoosePicturesFragment.java
index 30424a6..f83c392 100644
--- a/src/org/cyanogenmod/wallpapers/photophase/preferences/ChoosePicturesFragment.java
+++ b/src/org/cyanogenmod/wallpapers/photophase/preferences/ChoosePicturesFragment.java
@@ -156,6 +156,13 @@ public class ChoosePicturesFragment extends PreferenceFragment
@Override
protected void onPostExecute(Void result) {
mAlbumAdapter.notifyDataSetChanged();
+
+ if (mRestoreMenuItem != null) {
+ mRestoreMenuItem.setVisible(true);
+ }
+ if (mInvertMenuItem != null) {
+ mInvertMenuItem.setVisible(true);
+ }
}
/**
@@ -279,6 +286,9 @@ public class ChoosePicturesFragment extends PreferenceFragment
boolean mShowingAlbums;
+ MenuItem mRestoreMenuItem;
+ MenuItem mInvertMenuItem;
+
/**
* {@inheritDoc}
*/
@@ -428,6 +438,14 @@ public class ChoosePicturesFragment extends PreferenceFragment
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.albums, menu);
+ mRestoreMenuItem = menu.findItem(R.id.mnu_restore);
+ mInvertMenuItem = menu.findItem(R.id.mnu_invert);
+ if (mRestoreMenuItem != null) {
+ mRestoreMenuItem.setVisible(false);
+ }
+ if (mInvertMenuItem != null) {
+ mInvertMenuItem.setVisible(false);
+ }
}
/**