Skip to content

Commit

Permalink
OP QS Header: Surround bluetooth dialog view model with try catch block
Browse files Browse the repository at this point in the history
Signed-off-by: DrDisagree <[email protected]>
  • Loading branch information
Mahmud0808 committed Sep 5, 2024
1 parent cc24883 commit 2e35927
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
})

Expand Down

0 comments on commit 2e35927

Please sign in to comment.