MiuiCamera: Fix actionbar header and portrait realtime bokeh crash

Change-Id: I36ba72cdeb653a41e389d3c43574d6fea53d47ad
This commit is contained in:
Raya Mahardika committed 2026-10-03 16:29:33 +00:00
1 parent c17f301358
commit d8e4bf4e6f
2 files changed
+73 -2

No files matched your search

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1538de60be3c49a684e853f1b41be3b42e2dfb2d8ab4a82d422ba6b4b1d035cb
size 41017821
oid sha256:c272c17c95b9e2ab6ce98588edd28c9b12318d338f1be4a1704ff7fc260df239
size 41017938
@@ -0,0 +1,71 @@
From d4b8b6d2e4ab8bdcb9b56b261f678551ef330906 Mon Sep 17 00:00:00 2001
From: buxx <buxx@localhost>
Date: Sat, 3 Oct 2026 16:28:45 +0000
Subject: [PATCH] 0006 Fix actionbar and portrait bokeh crash
Change-Id: Icf6c3b502358c09eabd1cae16870b63f62b26ba9
---
res/values/styles.xml | 10 ++++++++--
.../camera2/compat/MiCameraCompatBaseImpl.smali | 9 ---------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 82b7c524..47285488 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -1651,7 +1651,7 @@
<style name="Theme.Compat.Preference.Light" parent="@style/Theme.Compat.Light">
<item name="preferenceTheme">@style/V11.PreferenceThemeOverlay.Light</item>
</style>
- <style name="ThemeCamera" parent="@miui:style/Theme.DayNight">
+ <style name="ThemeCamera" parent="@style/Theme.AppCompat.NoActionBar">
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowNoTitle">true</item>
@@ -1660,16 +1660,22 @@
<item name="android:listChoiceIndicatorMultiple">@drawable/btn_checkbox_light</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
<item name="miui:windowActionBar">false</item>
</style>
<style name="ThemeCameraSettingsMiuiX" parent="@style/Theme.Compat.Preference.DayNight" />
<style name="ThemeCustomizationPage" parent="@style/Theme.Compat.Preference.DayNight" />
- <style name="ThemeModeEditor" parent="@miui:style/Theme.DayNight">
+ <style name="ThemeModeEditor" parent="@style/Theme.AppCompat.NoActionBar">
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
<item name="miui:windowActionBar">false</item>
</style>
<style name="ThemeOverlay.AppCompat" parent="@style/Base.ThemeOverlay.AppCompat" />
diff --git a/smali_classes5/com/android/camera2/compat/MiCameraCompatBaseImpl.smali b/smali_classes5/com/android/camera2/compat/MiCameraCompatBaseImpl.smali
index 5daf2a98..ef29a7db 100644
--- a/smali_classes5/com/android/camera2/compat/MiCameraCompatBaseImpl.smali
+++ b/smali_classes5/com/android/camera2/compat/MiCameraCompatBaseImpl.smali
@@ -546,15 +546,6 @@
.method public applyDualBokeh(Landroid/hardware/camera2/CaptureRequest$Builder;Z)V
.locals 0
- .line 1
- sget-object p0, Lcom/android/camera2/vendortag/CaptureRequestVendorTags;->DUAL_BOKEH_ENABLE:Lcom/android/camera2/vendortag/VendorTag;
-
- invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
-
- move-result-object p2
-
- invoke-static {p1, p0, p2}, Lcom/android/camera2/vendortag/VendorTagHelper;->setValue(Landroid/hardware/camera2/CaptureRequest$Builder;Lcom/android/camera2/vendortag/VendorTag;Ljava/lang/Object;)V
-
return-void
.end method
--
2.43.0