Skip to content

Commit

Permalink
codinguser#876 - Add another test to reduce probability of not being …
Browse files Browse the repository at this point in the history
…able to change Book
  • Loading branch information
JeanGarf committed Jun 16, 2020
1 parent 56bb0a0 commit 13b3baf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ public boolean onMenuItemClick(MenuItem item) {
List<ActivityManager.RunningTaskInfo> taskList = mngr.getRunningTasks(10);
final ActivityManager.RunningTaskInfo task0RunningInfo = taskList.get(0);

if (task0RunningInfo.numActivities <= 1) {
if (task0RunningInfo.numActivities <= 1 || task0RunningInfo.baseActivity.getClassName()
.equals(this.getClass()
.getName())) {
// This is the first Activity

// Close current Activity (pop Activity stack)
Expand Down

0 comments on commit 13b3baf

Please sign in to comment.