diff options
author | Kenny Root <kroot@google.com> | 2010-10-07 14:01:55 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-07 14:01:55 -0700 |
commit | c0c2076e9a4dfd3b30b988d4ddd78abf9ed83166 (patch) | |
tree | 0806449362a8ff724808a71f7cc8473e23bfae38 | |
parent | 5e3329b5fac117ed49c9c3ca2919a4b1533612c4 (diff) | |
parent | e0c5ae7b55f1eb49b0aed94339bfb8e3cd8fefb9 (diff) | |
download | frameworks_base-c0c2076e9a4dfd3b30b988d4ddd78abf9ed83166.zip frameworks_base-c0c2076e9a4dfd3b30b988d4ddd78abf9ed83166.tar.gz frameworks_base-c0c2076e9a4dfd3b30b988d4ddd78abf9ed83166.tar.bz2 |
am e0c5ae7b: Merge "Eliminate MCS_GIVE_UP state" into gingerbread
Merge commit 'e0c5ae7b55f1eb49b0aed94339bfb8e3cd8fefb9' into gingerbread-plus-aosp
* commit 'e0c5ae7b55f1eb49b0aed94339bfb8e3cd8fefb9':
Eliminate MCS_GIVE_UP state
-rw-r--r-- | services/java/com/android/server/MountService.java | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 89015b2..6862db3 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -223,7 +223,6 @@ class MountService extends IMountService.Stub private static final int OBB_MCS_BOUND = 2; private static final int OBB_MCS_UNBIND = 3; private static final int OBB_MCS_RECONNECT = 4; - private static final int OBB_MCS_GIVE_UP = 5; /* * Default Container Service information @@ -1715,7 +1714,7 @@ class MountService extends IMountService.Stub private class ObbActionHandler extends Handler { private boolean mBound = false; - private List<ObbAction> mActions = new LinkedList<ObbAction>(); + private final List<ObbAction> mActions = new LinkedList<ObbAction>(); ObbActionHandler(Looper l) { super(l); @@ -1725,7 +1724,7 @@ class MountService extends IMountService.Stub public void handleMessage(Message msg) { switch (msg.what) { case OBB_RUN_ACTION: { - ObbAction action = (ObbAction) msg.obj; + final ObbAction action = (ObbAction) msg.obj; if (DEBUG_OBB) Slog.i(TAG, "OBB_RUN_ACTION: " + action.toString()); @@ -1761,7 +1760,7 @@ class MountService extends IMountService.Stub } mActions.clear(); } else if (mActions.size() > 0) { - ObbAction action = mActions.get(0); + final ObbAction action = mActions.get(0); if (action != null) { action.execute(this); } @@ -1809,13 +1808,6 @@ class MountService extends IMountService.Stub } break; } - case OBB_MCS_GIVE_UP: { - if (DEBUG_OBB) - Slog.i(TAG, "OBB_MCS_GIVE_UP"); - mActions.remove(0); - mObbActionHandler.sendEmptyMessage(OBB_MCS_BOUND); - break; - } } } @@ -1855,7 +1847,7 @@ class MountService extends IMountService.Stub mRetries++; if (mRetries > MAX_RETRIES) { Slog.w(TAG, "Failed to invoke remote methods on default container service. Giving up"); - mObbActionHandler.sendEmptyMessage(OBB_MCS_GIVE_UP); + mObbActionHandler.sendEmptyMessage(OBB_MCS_UNBIND); handleError(); return; } else { |