kopia lustrzana https://github.com/ryukoposting/Signal-Android
Revert "Fix wallpaper in landscape mode with notched devices."
This reverts commit 0b62bb8168
.
fork-5.53.8
rodzic
3f51f89d86
commit
9ed95a6081
|
@ -125,7 +125,7 @@ public final class AvatarPreviewActivity extends PassphraseRequiredActivity {
|
|||
toolbar.setTitle(recipient.getDisplayName(context));
|
||||
});
|
||||
|
||||
FullscreenHelper fullscreenHelper = FullscreenHelper.createWithShortEdgesCutoutMode(this);
|
||||
FullscreenHelper fullscreenHelper = new FullscreenHelper(this);
|
||||
|
||||
findViewById(android.R.id.content).setOnClickListener(v -> fullscreenHelper.toggleUiVisibility());
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ public final class MediaPreviewActivity extends PassphraseRequiredActivity
|
|||
|
||||
viewModel = ViewModelProviders.of(this).get(MediaPreviewViewModel.class);
|
||||
|
||||
fullscreenHelper = FullscreenHelper.createWithShortEdgesCutoutMode(this);
|
||||
fullscreenHelper = new FullscreenHelper(this);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
|||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(R.layout.webrtc_call_activity);
|
||||
|
||||
fullscreenHelper = FullscreenHelper.createWithShortEdgesCutoutMode(this);
|
||||
fullscreenHelper = new FullscreenHelper(this);
|
||||
|
||||
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ public class InsetAwareConstraintLayout extends ConstraintLayout {
|
|||
protected boolean fitSystemWindows(Rect insets) {
|
||||
Guideline statusBarGuideline = findViewById(R.id.status_bar_guideline);
|
||||
Guideline navigationBarGuideline = findViewById(R.id.navigation_bar_guideline);
|
||||
Guideline parentStartGuideline = findViewById(R.id.parent_start_guideline);
|
||||
Guideline parentEndGuideline = findViewById(R.id.parent_end_guideline);
|
||||
|
||||
if (statusBarGuideline != null) {
|
||||
statusBarGuideline.setGuidelineBegin(insets.top);
|
||||
|
@ -42,6 +44,14 @@ public class InsetAwareConstraintLayout extends ConstraintLayout {
|
|||
navigationBarGuideline.setGuidelineEnd(insets.bottom);
|
||||
}
|
||||
|
||||
if (parentStartGuideline != null) {
|
||||
parentStartGuideline.setGuidelineBegin(insets.left);
|
||||
}
|
||||
|
||||
if (parentEndGuideline != null) {
|
||||
parentEndGuideline.setGuidelineEnd(insets.right);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ public class ConversationActivity extends PassphraseRequiredActivity
|
|||
return;
|
||||
}
|
||||
|
||||
FullscreenHelper.createWithDefaultCutoutMode(this).showSystemUI();
|
||||
new FullscreenHelper(this).showSystemUI();
|
||||
|
||||
ConversationIntents.Args args = ConversationIntents.Args.from(getIntent());
|
||||
|
||||
|
|
|
@ -18,28 +18,14 @@ public final class FullscreenHelper {
|
|||
|
||||
@NonNull private final Activity activity;
|
||||
|
||||
public static @NonNull FullscreenHelper createWithDefaultCutoutMode(@NonNull Activity activity) {
|
||||
FullscreenHelper helper = new FullscreenHelper(activity);
|
||||
|
||||
helper.showSystemUI();
|
||||
|
||||
return helper;
|
||||
}
|
||||
|
||||
public static @NonNull FullscreenHelper createWithShortEdgesCutoutMode(@NonNull Activity activity) {
|
||||
FullscreenHelper helper = new FullscreenHelper(activity);
|
||||
public FullscreenHelper(@NonNull Activity activity) {
|
||||
this.activity = activity;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
activity.getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
||||
}
|
||||
|
||||
helper.showSystemUI();
|
||||
|
||||
return helper;
|
||||
}
|
||||
|
||||
private FullscreenHelper(@NonNull Activity activity) {
|
||||
this.activity = activity;
|
||||
showSystemUI();
|
||||
}
|
||||
|
||||
public void configureToolbarSpacer(@NonNull View spacer) {
|
||||
|
|
|
@ -90,7 +90,7 @@ public class ChatWallpaperPreviewActivity extends PassphraseRequiredActivity {
|
|||
bubble2.setText(getString(R.string.ChatWallpaperPreviewActivity__set_wallpaper_for_s, recipient.getDisplayName(this)));
|
||||
}
|
||||
|
||||
FullscreenHelper.createWithDefaultCutoutMode(this).showSystemUI();
|
||||
new FullscreenHelper(this).showSystemUI();
|
||||
WindowUtil.setLightStatusBarFromTheme(this);
|
||||
WindowUtil.setLightNavigationBarFromTheme(this);
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/parent_start_guideline"
|
||||
app:layout_constraintEnd_toEndOf="@id/parent_end_guideline"
|
||||
app:layout_constraintTop_toTopOf="@id/status_bar_guideline">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
|
@ -79,10 +79,10 @@
|
|||
android:id="@+id/layout_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="@id/status_bar_guideline"
|
||||
app:layout_constraintBottom_toBottomOf="@id/navigation_bar_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/status_bar_guideline">
|
||||
app:layout_constraintStart_toStartOf="@id/parent_start_guideline"
|
||||
app:layout_constraintEnd_toEndOf="@id/parent_end_guideline">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/conversation_container"
|
||||
|
@ -227,8 +227,8 @@
|
|||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/status_bar_guideline"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/navigation_bar_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/parent_start_guideline"
|
||||
app:layout_constraintEnd_toEndOf="@+id/parent_end_guideline"
|
||||
android:inflatedId="@+id/conversation_reaction_scrubber"
|
||||
android:layout="@layout/conversation_reaction_scrubber" />
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
android:id="@+id/conversation_reaction_scrubber"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/status_bar_guideline"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/navigation_bar_guideline"
|
||||
app:layout_constraintStart_toStartOf="@+id/parent_start_guideline"
|
||||
app:layout_constraintEnd_toEndOf="@+id/parent_end_guideline"
|
||||
android:elevation="1000dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/navigation_bar_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/status_bar_guideline"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.thoughtcrime.securesms.components.MaskView
|
||||
|
|
|
@ -14,4 +14,18 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
tools:layout_constraintGuide_end="48dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/parent_start_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_constraintGuide_begin="5dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/parent_end_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_constraintGuide_end="5dp" />
|
||||
</merge>
|
Ładowanie…
Reference in New Issue