diff options
Diffstat (limited to 'APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java')
-rw-r--r-- | APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java b/APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java index 379207471..d7f110fc6 100644 --- a/APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java +++ b/APG/android-libs/ActionBarSherlock/src/com/actionbarsherlock/widget/ActivityChooserModel.java @@ -25,7 +25,6 @@ import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.util.Xml; - import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; @@ -39,11 +38,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashSet; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Executor; +import java.util.concurrent.Executors; /** * <p> @@ -562,33 +561,7 @@ class ActivityChooserModel extends DataSetObservable { } } - private static final SerialExecutor SERIAL_EXECUTOR = new SerialExecutor(); - - private static class SerialExecutor implements Executor { - final LinkedList<Runnable> mTasks = new LinkedList<Runnable>(); - Runnable mActive; - - public synchronized void execute(final Runnable r) { - mTasks.offer(new Runnable() { - public void run() { - try { - r.run(); - } finally { - scheduleNext(); - } - } - }); - if (mActive == null) { - scheduleNext(); - } - } - - protected synchronized void scheduleNext() { - if ((mActive = mTasks.poll()) != null) { - mActive.run(); - } - } - } + private static final Executor SERIAL_EXECUTOR = Executors.newSingleThreadExecutor(); /** * Persists the history data to the backing file if the latter |