Skip to content

Commit

Permalink
Properly close DummyActivity on Android 10+
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbb committed Sep 12, 2024
1 parent 8fd3933 commit 739ca46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public boolean dispatchKeyShortcutEvent(KeyEvent event) {
return super.dispatchKeyShortcutEvent(event);
}

// @Override
@Override
public void onTopResumedActivityChanged(boolean isTopResumedActivity) {
if(!isTopResumedActivity)
performOnPauseLogic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
@Override
public void onBackPressed() {}

// @Override
@Override
public void onTopResumedActivityChanged(boolean isTopResumedActivity) {
isTopResumed = isTopResumedActivity;
dimScreen(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,11 @@ protected void onPause() {
if(finishOnPause)
finish();
}

@Override
public void onTopResumedActivityChanged(boolean isTopResumedActivity) {
if(isTopResumedActivity && finishOnPause) {
finish();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ private void setOnHomeScreen(boolean value) {
helper.setOnPrimaryHomeScreen(value);
}

// @Override
@Override
public void onTopResumedActivityChanged(boolean isTopResumedActivity) {
if(isTopResumedActivity)
performOnResumeLogic();
Expand Down

0 comments on commit 739ca46

Please sign in to comment.