Removed back workaround to solve side effects

This commit is contained in:
M66B
2023-10-20 21:48:27 +02:00
parent 93809c0a26
commit b88bbffb65
5 changed files with 15 additions and 25 deletions

View File

@@ -41,7 +41,6 @@ import android.os.SystemClock;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -824,18 +823,6 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
}
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (item.getItemId() == android.R.id.home) {
// Delegate to fragment first
if (super.onOptionsItemSelected(item))
return true;
performBack();
return true;
}
return super.onOptionsItemSelected(item);
}
public void performBack() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
// https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/Activity.java#3896