Skip to content

Commit 3d19e51

Browse files
committed
Fix bug for ActivityManager.exit
1 parent 36c6fc9 commit 3d19e51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

updatepluginlib/src/main/java/org/lzh/framework/updatepluginlib/util/ActivityManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ void registerSelf(Context context) {
9595

9696
public void exit() {
9797
Activity activity;
98-
while ((activity = stack.pop()) != null) {
98+
while (!stack.isEmpty()) {
99+
activity = stack.pop();
99100
if (!activity.isFinishing()) {
100101
activity.finish();
101102
}

0 commit comments

Comments
 (0)