am ec565efe: am eb2153c7: am 093d8de2: Merge "Finish already paused activity if it should be finished after pausing" into mnc-dev
* commit 'ec565efe706746157883822a93470cb3ef0fe6c0': Finish already paused activity if it should be finished after pausing
This commit is contained in:
@@ -2669,8 +2669,13 @@ final class ActivityStack {
|
|||||||
if (!r.finishing) {
|
if (!r.finishing) {
|
||||||
if (!mService.isSleeping()) {
|
if (!mService.isSleeping()) {
|
||||||
if (DEBUG_STATES) Slog.d(TAG_STATES, "no-history finish of " + r);
|
if (DEBUG_STATES) Slog.d(TAG_STATES, "no-history finish of " + r);
|
||||||
requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
|
if (requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
|
||||||
"stop-no-history", false);
|
"stop-no-history", false)) {
|
||||||
|
// Activity was finished, no need to continue trying to schedule stop.
|
||||||
|
adjustFocusedActivityLocked(r, "stopActivityFinished");
|
||||||
|
r.resumeKeyDispatchingLocked();
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DEBUG_STATES) Slog.d(TAG_STATES, "Not finishing noHistory " + r
|
if (DEBUG_STATES) Slog.d(TAG_STATES, "Not finishing noHistory " + r
|
||||||
+ " on stop because we're just sleeping");
|
+ " on stop because we're just sleeping");
|
||||||
@@ -2963,6 +2968,7 @@ final class ActivityStack {
|
|||||||
r.state = ActivityState.FINISHING;
|
r.state = ActivityState.FINISHING;
|
||||||
|
|
||||||
if (mode == FINISH_IMMEDIATELY
|
if (mode == FINISH_IMMEDIATELY
|
||||||
|
|| (mode == FINISH_AFTER_PAUSE && prevState == ActivityState.PAUSED)
|
||||||
|| prevState == ActivityState.STOPPED
|
|| prevState == ActivityState.STOPPED
|
||||||
|| prevState == ActivityState.INITIALIZING) {
|
|| prevState == ActivityState.INITIALIZING) {
|
||||||
// If this activity is already stopped, we can just finish
|
// If this activity is already stopped, we can just finish
|
||||||
|
|||||||
Reference in New Issue
Block a user