Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3175,6 +3175,7 @@ package android.app { method public void finishActivity(int); method public void finishActivityFromChild(android.app.Activity, int); method public void finishAffinity(); method public void finishAndRemoveTask(); method public void finishFromChild(android.app.Activity); method public void finishWithTransition(); method public android.app.ActionBar getActionBar(); core/java/android/app/Activity.java +21 −5 Original line number Diff line number Diff line Loading @@ -4314,11 +4314,10 @@ public class Activity extends ContextThemeWrapper } /** * Call this when your activity is done and should be closed. The * ActivityResult is propagated back to whoever launched you via * onActivityResult(). * Finishes the current activity and specifies whether to remove the task associated with this * activity. */ public void finish() { private void finish(boolean finishTask) { if (mParent == null) { int resultCode; Intent resultData; Loading @@ -4332,7 +4331,7 @@ public class Activity extends ContextThemeWrapper resultData.prepareToLeaveProcess(); } if (ActivityManagerNative.getDefault() .finishActivity(mToken, resultCode, resultData)) { .finishActivity(mToken, resultCode, resultData, finishTask)) { mFinished = true; } } catch (RemoteException e) { Loading @@ -4343,6 +4342,15 @@ public class Activity extends ContextThemeWrapper } } /** * Call this when your activity is done and should be closed. The * ActivityResult is propagated back to whoever launched you via * onActivityResult(). */ public void finish() { finish(false); } /** * Finish this activity as well as all activities immediately below it * in the current task that have the same affinity. This is typically Loading Loading @@ -4441,6 +4449,14 @@ public class Activity extends ContextThemeWrapper } } /** * Call this when your activity is done and should be closed and the task should be completely * removed as a part of finishing the Activity. */ public void finishAndRemoveTask() { finish(true); } /** * Called when an activity you launched exits, giving you the requestCode * you started it with, the resultCode it returned, and any additional Loading core/java/android/app/ActivityManagerNative.java +4 −2 Original line number Diff line number Diff line Loading @@ -263,7 +263,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM if (data.readInt() != 0) { resultData = Intent.CREATOR.createFromParcel(data); } boolean res = finishActivity(token, resultCode, resultData); boolean finishTask = (data.readInt() != 0); boolean res = finishActivity(token, resultCode, resultData, finishTask); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; Loading Loading @@ -2342,7 +2343,7 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); return result != 0; } public boolean finishActivity(IBinder token, int resultCode, Intent resultData) public boolean finishActivity(IBinder token, int resultCode, Intent resultData, boolean finishTask) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); Loading @@ -2355,6 +2356,7 @@ class ActivityManagerProxy implements IActivityManager } else { data.writeInt(0); } data.writeInt(finishTask ? 1 : 0); mRemote.transact(FINISH_ACTIVITY_TRANSACTION, data, reply, 0); reply.readException(); boolean res = reply.readInt() != 0; Loading core/java/android/app/ActivityThread.java +2 −2 Original line number Diff line number Diff line Loading @@ -2363,7 +2363,7 @@ public final class ActivityThread { // manager to stop us. try { ActivityManagerNative.getDefault() .finishActivity(r.token, Activity.RESULT_CANCELED, null); .finishActivity(r.token, Activity.RESULT_CANCELED, null, false); } catch (RemoteException ex) { // Ignore } Loading Loading @@ -2984,7 +2984,7 @@ public final class ActivityThread { // just end this activity. try { ActivityManagerNative.getDefault() .finishActivity(token, Activity.RESULT_CANCELED, null); .finishActivity(token, Activity.RESULT_CANCELED, null, false); } catch (RemoteException ex) { } } Loading core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public interface IActivityManager extends IInterface { int flagsMask, int flagsValues, Bundle options) throws RemoteException; public boolean startNextMatchingActivity(IBinder callingActivity, Intent intent, Bundle options) throws RemoteException; public boolean finishActivity(IBinder token, int code, Intent data) public boolean finishActivity(IBinder token, int code, Intent data, boolean finishTask) throws RemoteException; public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException; public boolean finishActivityAffinity(IBinder token) throws RemoteException; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3175,6 +3175,7 @@ package android.app { method public void finishActivity(int); method public void finishActivityFromChild(android.app.Activity, int); method public void finishAffinity(); method public void finishAndRemoveTask(); method public void finishFromChild(android.app.Activity); method public void finishWithTransition(); method public android.app.ActionBar getActionBar();
core/java/android/app/Activity.java +21 −5 Original line number Diff line number Diff line Loading @@ -4314,11 +4314,10 @@ public class Activity extends ContextThemeWrapper } /** * Call this when your activity is done and should be closed. The * ActivityResult is propagated back to whoever launched you via * onActivityResult(). * Finishes the current activity and specifies whether to remove the task associated with this * activity. */ public void finish() { private void finish(boolean finishTask) { if (mParent == null) { int resultCode; Intent resultData; Loading @@ -4332,7 +4331,7 @@ public class Activity extends ContextThemeWrapper resultData.prepareToLeaveProcess(); } if (ActivityManagerNative.getDefault() .finishActivity(mToken, resultCode, resultData)) { .finishActivity(mToken, resultCode, resultData, finishTask)) { mFinished = true; } } catch (RemoteException e) { Loading @@ -4343,6 +4342,15 @@ public class Activity extends ContextThemeWrapper } } /** * Call this when your activity is done and should be closed. The * ActivityResult is propagated back to whoever launched you via * onActivityResult(). */ public void finish() { finish(false); } /** * Finish this activity as well as all activities immediately below it * in the current task that have the same affinity. This is typically Loading Loading @@ -4441,6 +4449,14 @@ public class Activity extends ContextThemeWrapper } } /** * Call this when your activity is done and should be closed and the task should be completely * removed as a part of finishing the Activity. */ public void finishAndRemoveTask() { finish(true); } /** * Called when an activity you launched exits, giving you the requestCode * you started it with, the resultCode it returned, and any additional Loading
core/java/android/app/ActivityManagerNative.java +4 −2 Original line number Diff line number Diff line Loading @@ -263,7 +263,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM if (data.readInt() != 0) { resultData = Intent.CREATOR.createFromParcel(data); } boolean res = finishActivity(token, resultCode, resultData); boolean finishTask = (data.readInt() != 0); boolean res = finishActivity(token, resultCode, resultData, finishTask); reply.writeNoException(); reply.writeInt(res ? 1 : 0); return true; Loading Loading @@ -2342,7 +2343,7 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); return result != 0; } public boolean finishActivity(IBinder token, int resultCode, Intent resultData) public boolean finishActivity(IBinder token, int resultCode, Intent resultData, boolean finishTask) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); Loading @@ -2355,6 +2356,7 @@ class ActivityManagerProxy implements IActivityManager } else { data.writeInt(0); } data.writeInt(finishTask ? 1 : 0); mRemote.transact(FINISH_ACTIVITY_TRANSACTION, data, reply, 0); reply.readException(); boolean res = reply.readInt() != 0; Loading
core/java/android/app/ActivityThread.java +2 −2 Original line number Diff line number Diff line Loading @@ -2363,7 +2363,7 @@ public final class ActivityThread { // manager to stop us. try { ActivityManagerNative.getDefault() .finishActivity(r.token, Activity.RESULT_CANCELED, null); .finishActivity(r.token, Activity.RESULT_CANCELED, null, false); } catch (RemoteException ex) { // Ignore } Loading Loading @@ -2984,7 +2984,7 @@ public final class ActivityThread { // just end this activity. try { ActivityManagerNative.getDefault() .finishActivity(token, Activity.RESULT_CANCELED, null); .finishActivity(token, Activity.RESULT_CANCELED, null, false); } catch (RemoteException ex) { } } Loading
core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public interface IActivityManager extends IInterface { int flagsMask, int flagsValues, Bundle options) throws RemoteException; public boolean startNextMatchingActivity(IBinder callingActivity, Intent intent, Bundle options) throws RemoteException; public boolean finishActivity(IBinder token, int code, Intent data) public boolean finishActivity(IBinder token, int code, Intent data, boolean finishTask) throws RemoteException; public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException; public boolean finishActivityAffinity(IBinder token) throws RemoteException; Loading