Use API 31 tapjacking protection.

This commit is contained in:
akwizgran
2023-11-28 14:14:15 +00:00
parent 1752bca2ae
commit 17f5433ab0
3 changed files with 11 additions and 1 deletions

View File

@@ -101,6 +101,8 @@ public abstract class BaseActivity extends AppCompatActivity
// unlock screen is shown.
if (PREVENT_SCREENSHOTS) getWindow().addFlags(FLAG_SECURE);
if (SDK_INT >= 31) getWindow().setHideOverlayWindows(true);
for (ActivityLifecycleController alc : lifecycleControllers) {
alc.onActivityCreate(this);
}

View File

@@ -13,6 +13,7 @@ import org.briarproject.briar.android.Localizer;
import androidx.appcompat.app.AppCompatActivity;
import static android.content.Intent.ACTION_VIEW;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static org.briarproject.briar.android.TestingConstants.PREVENT_SCREENSHOTS;
@@ -25,6 +26,8 @@ public class ExpiredActivity extends AppCompatActivity
if (PREVENT_SCREENSHOTS) getWindow().addFlags(FLAG_SECURE);
if (SDK_INT >= 31) getWindow().setHideOverlayWindows(true);
setContentView(R.layout.activity_expired);
findViewById(R.id.download_briar_button).setOnClickListener(this);
}