diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-10-05 14:13:34 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-10-05 14:13:34 +0200 |
commit | abb3aaf5d96cb301ad29e6ad401edb3ee271d46e (patch) | |
tree | f46378b6154d9bed053a1f067f902750823b20cb /src | |
parent | 15446f18479a57a8d485d1c95e810b609b67f69f (diff) | |
download | AntennaPod-abb3aaf5d96cb301ad29e6ad401edb3ee271d46e.zip |
Applied Action Mode workaround to DownloadActivity
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/activity/DownloadActivity.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/activity/DownloadActivity.java b/src/de/danoeh/antennapod/activity/DownloadActivity.java index 001c4abbd..51491a286 100644 --- a/src/de/danoeh/antennapod/activity/DownloadActivity.java +++ b/src/de/danoeh/antennapod/activity/DownloadActivity.java @@ -9,6 +9,7 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.res.TypedArray; import android.os.AsyncTask; +import android.os.Build; import android.os.Bundle; import android.os.IBinder; import android.support.v4.app.NavUtils; @@ -239,11 +240,19 @@ public class DownloadActivity extends ActionBarActivity implements return handled; } + private boolean actionModeDestroyWorkaround = false; // TODO remove this workaround + private boolean skipWorkAround = Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH; + @Override public void onDestroyActionMode(ActionMode mode) { - mActionMode = null; - selectedDownload = null; - dla.setSelectedItemIndex(DownloadlistAdapter.SELECTION_NONE); + if (skipWorkAround || actionModeDestroyWorkaround) { + mActionMode = null; + selectedDownload = null; + dla.setSelectedItemIndex(DownloadlistAdapter.SELECTION_NONE); + actionModeDestroyWorkaround = false; + } else { + actionModeDestroyWorkaround = true; + } } private BroadcastReceiver contentChanged = new BroadcastReceiver() { |