mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-06 05:14:50 +01:00
Fix some dead back button handling.
This commit is contained in:
committed by
Alex Hart
parent
7e6c89931d
commit
d441c3da53
@@ -313,13 +313,6 @@ public class SubmitDebugLogActivity extends BaseActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (!viewModel.onBackPressed()) {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
@@ -172,10 +172,6 @@ public class SubmitDebugLogViewModel extends ViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
boolean onBackPressed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
enum Mode {
|
||||
NORMAL, LOADING, SUBMITTING
|
||||
}
|
||||
|
||||
+8
-7
@@ -1,8 +1,8 @@
|
||||
package org.thoughtcrime.securesms.megaphone;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
@@ -31,6 +31,13 @@ public class ClientDeprecatedActivity extends PassphraseRequiredActivity {
|
||||
|
||||
findViewById(R.id.client_deprecated_update_button).setOnClickListener(v -> onUpdateClicked());
|
||||
findViewById(R.id.client_deprecated_dont_update_button).setOnClickListener(v -> onDontUpdateClicked());
|
||||
|
||||
getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
|
||||
@Override
|
||||
public void handleOnBackPressed() {
|
||||
// The user must explicitly choose to update or to dismiss this screen.
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,12 +51,6 @@ public class ClientDeprecatedActivity extends PassphraseRequiredActivity {
|
||||
theme.onResume(this);
|
||||
}
|
||||
|
||||
@SuppressLint("MissingSuperCall")
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// Disabled
|
||||
}
|
||||
|
||||
private void onUpdateClicked() {
|
||||
PlayStoreUtil.openPlayStoreOrOurApkDownloadPage(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user