Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3055f3dd authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by android-build-merger
Browse files

Merge "Merge "Clear state when ProgressMessageCtrl. is canceled" into nyc-dev...

Merge "Merge "Clear state when ProgressMessageCtrl. is canceled" into nyc-dev am: 11e215bc am: 74aac8d9" into nyc-mr1-dev-plus-aosp
am: 57fe0d1b

* commit '57fe0d1b':
  Clear state when ProgressMessageCtrl. is canceled

Change-Id: I1c9fd5e1f4b01fddec6f8e3a042bb6398d6f0944
parents a64d593c 57fe0d1b
Loading
Loading
Loading
Loading
+21 −4
Original line number Original line Diff line number Diff line
@@ -683,6 +683,10 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
                }
                }
            });
            });
        } else if (resultCode == RESULT_CANCELED) {
        } else if (resultCode == RESULT_CANCELED) {
            if (DEBUG) {
                Log.i(LOG_TAG, "[state]" + STATE_CONFIGURING);
            }

            mState = STATE_CONFIGURING;
            mState = STATE_CONFIGURING;


            // The previous update might have been canceled
            // The previous update might have been canceled
@@ -898,9 +902,15 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
    private void setState(int state) {
    private void setState(int state) {
        if (isFinalState(mState)) {
        if (isFinalState(mState)) {
            if (isFinalState(state)) {
            if (isFinalState(state)) {
                if (DEBUG) {
                    Log.i(LOG_TAG, "[state]" + state);
                }
                mState = state;
                mState = state;
            }
            }
        } else {
        } else {
            if (DEBUG) {
                Log.i(LOG_TAG, "[state]" + state);
            }
            mState = state;
            mState = state;
        }
        }
    }
    }
@@ -2896,13 +2906,20 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
        }
        }


        public int cancel() {
        public int cancel() {
            int state;

            if (!mPosted) {
            if (!mPosted) {
                return getStateAfterCancel();
                state = getStateAfterCancel();
            }
            } else {
                mPosted = false;
                mPosted = false;
                mHandler.removeCallbacks(this);
                mHandler.removeCallbacks(this);


            return getStateAfterCancel();
                state = getStateAfterCancel();
            }

            mPreviousState = -1;

            return state;
        }
        }


        @Override
        @Override