diff options
author | Chong Zhang <chz@google.com> | 2016-06-28 17:35:18 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2016-06-28 18:08:13 -0700 |
commit | 2fde939272dbb99cb3a3e4fcaaa73658b42c3963 (patch) | |
tree | 0b9c647e9110f406826840f971253876b61caa8e /cmds/am | |
parent | 2cd8281a236a9c58bfdb22ce1e2e37303fdcd987 (diff) |
Fix off-by-one in am start -R (repeat)
bug: 26028552
Change-Id: I075b378b6f126d124d867282d76a78d865b54178
Diffstat (limited to 'cmds/am')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 8ccd5d2ebcba..d6c00589e7c2 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -723,10 +723,10 @@ public class Am extends BaseCommand { System.out.println("Complete"); } mRepeat--; - if (mRepeat > 1) { + if (mRepeat > 0) { mAm.unhandledBack(); } - } while (mRepeat > 1); + } while (mRepeat > 0); } private void runForceStop() throws Exception { |