diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-28 21:14:04 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-11-28 21:14:04 -0700 |
commit | 7085fd448191c8caf6e28c3073f605aaceb7f567 (patch) | |
tree | b2f7c04e214a32e7af75ccb3be5ec3ada33bda5f | |
parent | aff944dfed0e5d64043d5304a41d751e34ba802a (diff) | |
parent | 2bbfe03ed39be95325bfe8721f31c5226aa2ac17 (diff) | |
download | android_packages_apps_Stk-7085fd448191c8caf6e28c3073f605aaceb7f567.tar.gz android_packages_apps_Stk-7085fd448191c8caf6e28c3073f605aaceb7f567.tar.bz2 android_packages_apps_Stk-7085fd448191c8caf6e28c3073f605aaceb7f567.zip |
Promotion of atel.lnx.2.0-00033.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1089454 965755 Ibc21f5ea94760ec338385e719e20c8bab49651de When stk handle session end, finished all of the stk sub
Change-Id: I25945c371c6ab04880d33a99d6f7add71b458cf4
CRs-Fixed: 965755, 1089454
-rw-r--r-- | src/com/android/stk/StkAppService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java index ff8227a..c1e5eaf 100644 --- a/src/com/android/stk/StkAppService.java +++ b/src/com/android/stk/StkAppService.java @@ -125,6 +125,7 @@ public class StkAppService extends Service implements Runnable { protected int mMenuState = StkMenuActivity.STATE_INIT; protected int mOpCode = -1; private Activity mActivityInstance = null; + private Activity mPrevActivityInstance = null; private Activity mDialogInstance = null; private Activity mMainActivityInstance = null; private int mSlotId = 0; @@ -142,6 +143,11 @@ public class StkAppService extends Service implements Runnable { mActivityInstance); return mActivityInstance; } + final synchronized Activity getPendingPrevActivityInstance() { + CatLog.d(this, "getPendingPrevActivityInstance act : " + mSlotId + ", " + + mPrevActivityInstance); + return mPrevActivityInstance; + } final synchronized void setPendingDialogInstance(Activity act) { CatLog.d(this, "setPendingDialogInstance act : " + mSlotId + ", " + act); callSetActivityInstMsg(OP_SET_DAL_INST, mSlotId, act); @@ -602,6 +608,7 @@ public class StkAppService extends Service implements Runnable { Activity act = new Activity(); act = (Activity) msg.obj; CatLog.d(LOG_TAG, "Set activity instance. " + act); + mStkContext[slotId].mPrevActivityInstance = mStkContext[slotId].mActivityInstance; mStkContext[slotId].mActivityInstance = act; break; case OP_SET_DAL_INST: @@ -1275,6 +1282,7 @@ public class StkAppService extends Service implements Runnable { */ private void cleanUpInstanceStackBySlot(int slotId) { Activity activity = mStkContext[slotId].getPendingActivityInstance(); + Activity prevActivity = mStkContext[slotId].getPendingPrevActivityInstance(); Activity dialog = mStkContext[slotId].getPendingDialogInstance(); CatLog.d(LOG_TAG, "cleanUpInstanceStackBySlot slotId: " + slotId); if (mStkContext[slotId].mCurrentCmd == null) { @@ -1296,6 +1304,11 @@ public class StkAppService extends Service implements Runnable { mStkContext[slotId].mIsMenuPending = true; } else { } + if (prevActivity != null) { + CatLog.d(LOG_TAG, "finish pending prev activity at first."); + prevActivity.finish(); + mStkContext[slotId].mPrevActivityInstance = null; + } CatLog.d(LOG_TAG, "finish pending activity."); activity.finish(); mStkContext[slotId].mActivityInstance = null; |