();
@@ -543,7 +538,6 @@ public class K9 extends Application {
editor.putInt("messageViewTheme", messageViewTheme.ordinal());
editor.putInt("messageComposeTheme", composerTheme.ordinal());
editor.putBoolean("fixedMessageViewTheme", useFixedMessageTheme);
- editor.putBoolean("useGalleryBugWorkaround", useGalleryBugWorkaround);
editor.putBoolean("confirmDelete", mConfirmDelete);
editor.putBoolean("confirmDeleteStarred", mConfirmDeleteStarred);
@@ -582,8 +576,6 @@ public class K9 extends Application {
super.onCreate();
app = this;
- galleryBuggy = checkForBuggyGallery();
-
sIsDebuggable = ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0);
checkCachedDatabaseVersion();
@@ -749,8 +741,6 @@ public class K9 extends Application {
mHideUserAgent = sprefs.getBoolean("hideUserAgent", false);
mHideTimeZone = sprefs.getBoolean("hideTimeZone", false);
- useGalleryBugWorkaround = sprefs.getBoolean("useGalleryBugWorkaround", K9.isGalleryBuggy());
-
mConfirmDelete = sprefs.getBoolean("confirmDelete", false);
mConfirmDeleteStarred = sprefs.getBoolean("confirmDeleteStarred", false);
mConfirmSpam = sprefs.getBoolean("confirmSpam", false);
@@ -1185,18 +1175,6 @@ public class K9 extends Application {
mHideSpecialAccounts = hideSpecialAccounts;
}
- public static boolean useGalleryBugWorkaround() {
- return useGalleryBugWorkaround;
- }
-
- public static void setUseGalleryBugWorkaround(boolean useGalleryBugWorkaround) {
- K9.useGalleryBugWorkaround = useGalleryBugWorkaround;
- }
-
- public static boolean isGalleryBuggy() {
- return galleryBuggy;
- }
-
public static boolean confirmDelete() {
return mConfirmDelete;
}
@@ -1245,25 +1223,6 @@ public class K9 extends Application {
sNotificationQuickDelete = mode;
}
- /**
- * Check if this system contains a buggy Gallery 3D package.
- *
- * We have to work around the fact that those Gallery versions won't show
- * any images or videos when the pick intent is used with a MIME type other
- * than image/* or video/*. See issue 1186.
- *
- * @return true, if a buggy Gallery 3D package was found. False, otherwise.
- */
- private boolean checkForBuggyGallery() {
- try {
- PackageInfo pi = getPackageManager().getPackageInfo("com.cooliris.media", 0);
-
- return (pi.versionCode == 30682);
- } catch (NameNotFoundException e) {
- return false;
- }
- }
-
public static boolean wrapFolderNames() {
return mWrapFolderNames;
}
diff --git a/src/com/fsck/k9/activity/MessageCompose.java b/src/com/fsck/k9/activity/MessageCompose.java
index f27e334fc..9c473629a 100644
--- a/src/com/fsck/k9/activity/MessageCompose.java
+++ b/src/com/fsck/k9/activity/MessageCompose.java
@@ -2042,18 +2042,6 @@ public class MessageCompose extends K9Activity implements OnClickListener,
* Kick off a picker for whatever kind of MIME types we'll accept and let Android take over.
*/
private void onAddAttachment() {
- if (K9.isGalleryBuggy()) {
- if (K9.useGalleryBugWorkaround()) {
- Toast.makeText(MessageCompose.this,
- getString(R.string.message_compose_use_workaround),
- Toast.LENGTH_LONG).show();
- } else {
- Toast.makeText(MessageCompose.this,
- getString(R.string.message_compose_buggy_gallery),
- Toast.LENGTH_LONG).show();
- }
- }
-
onAddAttachment2("*/*");
}
@@ -2549,12 +2537,6 @@ public class MessageCompose extends K9Activity implements OnClickListener,
case R.id.add_attachment:
onAddAttachment();
break;
- case R.id.add_attachment_image:
- onAddAttachment2("image/*");
- break;
- case R.id.add_attachment_video:
- onAddAttachment2("video/*");
- break;
case R.id.read_receipt:
onReadReceipt();
default:
@@ -2575,13 +2557,6 @@ public class MessageCompose extends K9Activity implements OnClickListener,
menu.findItem(R.id.save).setEnabled(false);
}
- /*
- * Show the menu items "Add attachment (Image)" and "Add attachment (Video)"
- * if the work-around for the Gallery bug is enabled (see Issue 1186).
- */
- menu.findItem(R.id.add_attachment_image).setVisible(K9.useGalleryBugWorkaround());
- menu.findItem(R.id.add_attachment_video).setVisible(K9.useGalleryBugWorkaround());
-
return true;
}
diff --git a/src/com/fsck/k9/activity/setup/Prefs.java b/src/com/fsck/k9/activity/setup/Prefs.java
index b3e0d0416..f2d574557 100644
--- a/src/com/fsck/k9/activity/setup/Prefs.java
+++ b/src/com/fsck/k9/activity/setup/Prefs.java
@@ -87,7 +87,6 @@ public class Prefs extends K9PreferenceActivity {
private static final String PREFERENCE_AUTOFIT_WIDTH = "messageview_autofit_width";
private static final String PREFERENCE_BACKGROUND_OPS = "background_ops";
- private static final String PREFERENCE_GALLERY_BUG_WORKAROUND = "use_gallery_bug_workaround";
private static final String PREFERENCE_DEBUG_LOGGING = "debug_logging";
private static final String PREFERENCE_SENSITIVE_LOGGING = "sensitive_logging";
@@ -134,7 +133,6 @@ public class Prefs extends K9PreferenceActivity {
private CheckBoxPreference mShowNext;
private CheckBoxPreference mAutofitWidth;
private ListPreference mBackgroundOps;
- private CheckBoxPreference mUseGalleryBugWorkaround;
private CheckBoxPreference mDebugLogging;
private CheckBoxPreference mSensitiveLogging;
private CheckBoxPreference mHideUserAgent;
@@ -341,9 +339,6 @@ public class Prefs extends K9PreferenceActivity {
mBackgroundOps = setupListPreference(PREFERENCE_BACKGROUND_OPS, K9.getBackgroundOps().name());
- mUseGalleryBugWorkaround = (CheckBoxPreference)findPreference(PREFERENCE_GALLERY_BUG_WORKAROUND);
- mUseGalleryBugWorkaround.setChecked(K9.useGalleryBugWorkaround());
-
mDebugLogging = (CheckBoxPreference)findPreference(PREFERENCE_DEBUG_LOGGING);
mSensitiveLogging = (CheckBoxPreference)findPreference(PREFERENCE_SENSITIVE_LOGGING);
mHideUserAgent = (CheckBoxPreference)findPreference(PREFERENCE_HIDE_USERAGENT);
@@ -492,7 +487,6 @@ public class Prefs extends K9PreferenceActivity {
K9.setSplitViewMode(SplitViewMode.valueOf(mSplitViewMode.getValue()));
K9.setAttachmentDefaultPath(mAttachmentPathPreference.getSummary().toString());
boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());
- K9.setUseGalleryBugWorkaround(mUseGalleryBugWorkaround.isChecked());
if (!K9.DEBUG && mDebugLogging.isChecked()) {
Toast.makeText(this, R.string.debug_logging_enabled, Toast.LENGTH_LONG).show();
diff --git a/src/com/fsck/k9/preferences/GlobalSettings.java b/src/com/fsck/k9/preferences/GlobalSettings.java
index be13bbe01..38d134a8f 100644
--- a/src/com/fsck/k9/preferences/GlobalSettings.java
+++ b/src/com/fsck/k9/preferences/GlobalSettings.java
@@ -188,9 +188,6 @@ public class GlobalSettings {
new V(16, new ThemeSetting(K9.Theme.LIGHT)),
new V(24, new SubThemeSetting(K9.Theme.USE_GLOBAL))
));
- s.put("useGalleryBugWorkaround", Settings.versions(
- new V(1, new GalleryBugWorkaroundSetting())
- ));
s.put("useVolumeKeysForListNavigation", Settings.versions(
new V(1, new BooleanSetting(false))
));
@@ -372,27 +369,6 @@ public class GlobalSettings {
}
}
- /**
- * The gallery bug work-around setting.
- *
- *
- * The default value varies depending on whether you have a version of Gallery 3D installed
- * that contains the bug we work around.
- *
- *
- * @see K9#isGalleryBuggy()
- */
- public static class GalleryBugWorkaroundSetting extends BooleanSetting {
- public GalleryBugWorkaroundSetting() {
- super(false);
- }
-
- @Override
- public Object getDefaultValue() {
- return K9.isGalleryBuggy();
- }
- }
-
/**
* The language setting.
*
diff --git a/src/com/fsck/k9/preferences/Settings.java b/src/com/fsck/k9/preferences/Settings.java
index 694730673..1d06b7fd2 100644
--- a/src/com/fsck/k9/preferences/Settings.java
+++ b/src/com/fsck/k9/preferences/Settings.java
@@ -35,7 +35,7 @@ public class Settings {
*
* @see SettingsExporter
*/
- public static final int VERSION = 34;
+ public static final int VERSION = 35;
public static Map validate(int version, Map> settings,