From 2e35927fd82804ed3a1ea2334afe45d284811bb1 Mon Sep 17 00:00:00 2001 From: DrDisagree Date: Thu, 5 Sep 2024 19:08:59 +0600 Subject: [PATCH] OP QS Header: Surround bluetooth dialog view model with try catch block Signed-off-by: DrDisagree --- .../com/drdisagree/iconify/xposed/modules/OpQsHeader.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/drdisagree/iconify/xposed/modules/OpQsHeader.kt b/app/src/main/java/com/drdisagree/iconify/xposed/modules/OpQsHeader.kt index fae066ec4..2135cfa28 100644 --- a/app/src/main/java/com/drdisagree/iconify/xposed/modules/OpQsHeader.kt +++ b/app/src/main/java/com/drdisagree/iconify/xposed/modules/OpQsHeader.kt @@ -318,7 +318,12 @@ class OpQsHeader(context: Context?) : ModPack(context!!) { hookAllConstructors(bluetoothTileClass, object : XC_MethodHook() { override fun afterHookedMethod(param: MethodHookParam) { - mBluetoothTileDialogViewModel = getObjectField(param.thisObject, "mDialogViewModel") + try { + mBluetoothTileDialogViewModel = + getObjectField(param.thisObject, "mDialogViewModel") + } catch (ignored: Throwable) { + log(TAG + "Bluetooth dialog view model not found") + } } })