mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Fix issue with bottom sheets.
This commit is contained in:
@@ -6,6 +6,7 @@ import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -15,6 +16,14 @@ public final class WindowUtil {
|
||||
private WindowUtil() {
|
||||
}
|
||||
|
||||
public static void initializeScreenshotSecurity(@NonNull Context context, @NonNull Window window) {
|
||||
if (TextSecurePreferences.isScreenSecurityEnabled(context)) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setLightNavigationBarFromTheme(@NonNull Activity activity) {
|
||||
if (Build.VERSION.SDK_INT < 27) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user