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

Commit 11e215bc authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

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

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

            mState = STATE_CONFIGURING;

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

        public int cancel() {
            int state;

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

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

            mPreviousState = -1;

            return state;
        }

        @Override