MiuiCamera: Fix settings crash by bypassing MIUI theme requirement
- In ActivityDelegate and FragmentDelegate, remove Window_windowActionBar theme check that throws IllegalStateException when running on non-MIUI/AOSP themes Change-Id: Ia0192aedd8777233941e4bfaab81282935b66521
This commit is contained in:
2 files changed
+83
-2
No files matched your search
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:108e6ead6b44a2b2a45380eb1ec9db226a038fc5c5fed92db8a3296f4c9e00fb
|
oid sha256:c1b58ec2a46a8790c02e0ff76230ca7e8daa8a51748fd0599d149aefec0e5f72
|
||||||
size 57067624
|
size 57018472
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
From c5f6c9cfa42896fc15f030b1b33b2e47f0ceafc4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: buxx <buxx@localhost>
|
||||||
|
Date: Sun, 4 Oct 2026 03:30:14 +0000
|
||||||
|
Subject: [PATCH] 0007 Fix settings crash by allowing non-miui themes
|
||||||
|
|
||||||
|
Change-Id: Id878235f0781ec57dc45aa85caf0cdac5aa201d9
|
||||||
|
---
|
||||||
|
.../com/miui/internal/app/ActivityDelegate.smali | 15 +--------------
|
||||||
|
.../com/miui/internal/app/FragmentDelegate.smali | 15 ++-------------
|
||||||
|
2 files changed, 3 insertions(+), 27 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/smali_classes6/com/miui/internal/app/ActivityDelegate.smali b/smali_classes6/com/miui/internal/app/ActivityDelegate.smali
|
||||||
|
index 72e73075..e5a383fb 100644
|
||||||
|
--- a/smali_classes6/com/miui/internal/app/ActivityDelegate.smali
|
||||||
|
+++ b/smali_classes6/com/miui/internal/app/ActivityDelegate.smali
|
||||||
|
@@ -484,12 +484,6 @@
|
||||||
|
:cond_1
|
||||||
|
sget v3, Lmiui/R$styleable;->Window_windowActionBar:I
|
||||||
|
|
||||||
|
- invoke-virtual {v2, v3}, Landroid/content/res/TypedArray;->hasValue(I)Z
|
||||||
|
-
|
||||||
|
- move-result v3
|
||||||
|
-
|
||||||
|
- if-eqz v3, :cond_f
|
||||||
|
-
|
||||||
|
.line 8
|
||||||
|
sget v3, Lmiui/R$styleable;->Window_windowActionBar:I
|
||||||
|
|
||||||
|
@@ -875,14 +869,7 @@
|
||||||
|
:cond_f
|
||||||
|
invoke-virtual {v2}, Landroid/content/res/TypedArray;->recycle()V
|
||||||
|
|
||||||
|
- .line 57
|
||||||
|
- new-instance p0, Ljava/lang/IllegalStateException;
|
||||||
|
-
|
||||||
|
- const-string v0, "You need to use a miui theme (or descendant) with this activity."
|
||||||
|
-
|
||||||
|
- invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||||||
|
-
|
||||||
|
- throw p0
|
||||||
|
+ return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public invalidateOptionsMenu()V
|
||||||
|
diff --git a/smali_classes6/com/miui/internal/app/FragmentDelegate.smali b/smali_classes6/com/miui/internal/app/FragmentDelegate.smali
|
||||||
|
index 926832ce..f9bdffe1 100644
|
||||||
|
--- a/smali_classes6/com/miui/internal/app/FragmentDelegate.smali
|
||||||
|
+++ b/smali_classes6/com/miui/internal/app/FragmentDelegate.smali
|
||||||
|
@@ -507,12 +507,6 @@
|
||||||
|
.line 2
|
||||||
|
sget v1, Lmiui/R$styleable;->Window_windowActionBar:I
|
||||||
|
|
||||||
|
- invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->hasValue(I)Z
|
||||||
|
-
|
||||||
|
- move-result v1
|
||||||
|
-
|
||||||
|
- if-eqz v1, :cond_5
|
||||||
|
-
|
||||||
|
.line 3
|
||||||
|
sget v1, Lmiui/R$styleable;->Window_windowActionBar:I
|
||||||
|
|
||||||
|
@@ -673,14 +667,9 @@
|
||||||
|
:cond_5
|
||||||
|
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
|
||||||
|
|
||||||
|
- .line 24
|
||||||
|
- new-instance p0, Ljava/lang/IllegalStateException;
|
||||||
|
-
|
||||||
|
- const-string p1, "You need to use a miui theme (or descendant) with this fragment."
|
||||||
|
-
|
||||||
|
- invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||||||
|
+ const/4 p0, 0x0
|
||||||
|
|
||||||
|
- throw p0
|
||||||
|
+ return-object p0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public onMenuItemSelected(ILandroid/view/MenuItem;)Z
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
Reference in new issue
Block a user