diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/PulseViewHook.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/PulseViewHook.java index 3a54b4be0..2555cd77e 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/PulseViewHook.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/PulseViewHook.java @@ -138,7 +138,12 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } });*/ - Class NotificationShadeWindowView = findClass("com.android.systemui.shade.NotificationShadeWindowView", lpparam.classLoader); + Class NotificationShadeWindowView; + try { + NotificationShadeWindowView = findClass("com.android.systemui.shade.NotificationShadeWindowView", lpparam.classLoader); + } catch (Throwable t) { + NotificationShadeWindowView = findClass("com.android.systemui.statusbar.phone.NotificationShadeWindowView", lpparam.classLoader); + } hookAllConstructors(NotificationShadeWindowView, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { @@ -156,7 +161,12 @@ protected void afterHookedMethod(XC_MethodHook.MethodHookParam methodHookParam) } }); - Class AodRootLayout = findClass("com.oplus.systemui.aod.aodclock.off.AodRootLayout", lpparam.classLoader); + Class AodRootLayout; + try { + AodRootLayout = findClass("com.oplus.systemui.aod.aodclock.off.AodRootLayout", lpparam.classLoader); + } catch (Throwable t) { + AodRootLayout = findClass("com.oplusos.systemui.aod.aodclock.off.AodRootLayout", lpparam.classLoader); + } hookAllConstructors(AodRootLayout, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { @@ -175,21 +185,13 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { try { mStartButton = mKeyguardBottomArea.findViewById(mContext.getResources().getIdentifier("start_button", "id", Constants.Packages.SYSTEM_UI)); mEndButton = mKeyguardBottomArea.findViewById(mContext.getResources().getIdentifier("end_button", "id", Constants.Packages.SYSTEM_UI)); - } catch (Throwable e) { - e.printStackTrace(); + } catch (Throwable t) { + log(TAG + "Failed to find start/end button"); } updateLockscreenIcons(); } }); - - hookAllConstructors(CentralSurfacesImpl, new XC_MethodHook() { - @Override - protected void afterHookedMethod(MethodHookParam param) throws Throwable { - - } - }); - hookAllMethods(CentralSurfacesImpl, "keyguardGoingAway", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/VolumePanel.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/VolumePanel.java index 8564af993..8c39bf78d 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/VolumePanel.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/VolumePanel.java @@ -111,17 +111,8 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); - Class VolumeDialogImpl = findClass("com.android.systemui.volume.VolumeDialogImpl", lpparam.classLoader); - hookAllMethods(VolumeDialogImpl, "showSafetyWarningH", new XC_MethodHook() { - @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - if (mDisableVolumeWarning) { - param.setResult(null); - } - } - }); - Class OplusVolumeDialog = findClass("com.oplus.systemui.volume.OplusVolumeDialogImpl", lpparam.classLoader); + hookAllConstructors(OplusVolumeDialogImpl, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { @@ -129,7 +120,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - hookAllMethods(OplusVolumeDialog, "initRow", new XC_MethodHook() { + hookAllMethods(OplusVolumeDialogImpl, "initRow", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { if (!sliderCustomizable) return; @@ -209,13 +200,23 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } } }); - hookAllMethods(OplusVolumeDialog, "updateVolumeRowH", volumeIconHook); + hookAllMethods(OplusVolumeDialogImpl, "updateVolumeRowH", volumeIconHook); - hookAllMethods(OplusVolumeDialog, "updateVolumeRowSliderH", volumeIconHook); - hookAllMethods(OplusVolumeDialog, "updateVolumeRowTintH", volumeIconHook); - hookAllMethods(OplusVolumeDialog, "refreshVisibleRow", volumeIconHook); + hookAllMethods(OplusVolumeDialogImpl, "updateVolumeRowSliderH", volumeIconHook); + hookAllMethods(OplusVolumeDialogImpl, "updateVolumeRowTintH", volumeIconHook); + hookAllMethods(OplusVolumeDialogImpl, "refreshVisibleRow", volumeIconHook); + Class VolumeDialogImpl = findClass("com.android.systemui.volume.VolumeDialogImpl", lpparam.classLoader); + hookAllMethods(VolumeDialogImpl, "showSafetyWarningH", new XC_MethodHook() { + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + if (mDisableVolumeWarning) { + param.setResult(null); + } + } + }); + } private void updateVolumePanel() { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/Lockscreen.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/Lockscreen.java index df82598bd..4c092618b 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/Lockscreen.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/Lockscreen.java @@ -87,11 +87,8 @@ private boolean isMethodSecure() { public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { if (!lpparam.packageName.equals(listenPackage)) return; - - KeyguardHelper = findClass("com.oplus.systemui.common.helper.KeyguardHelper", lpparam.classLoader); - - Class OplusEmergencyButtonExImpl = findClass("com.oplus.keyguard.OplusEmergencyButtonExImpl", lpparam.classLoader); try { + Class OplusEmergencyButtonExImpl = findClass("com.oplus.keyguard.OplusEmergencyButtonExImpl", lpparam.classLoader); findAndHookMethod(OplusEmergencyButtonExImpl, "disableShowEmergencyButton", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { @@ -99,10 +96,15 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); } catch (Throwable t) { - log(TAG + "disableShowEmergencyButton not found"); + log(TAG + "OplusEmergencyButtonExImpl not found"); } - Class OnScreenFingerprint = findClass("com.oplus.systemui.biometrics.finger.udfps.OnScreenFingerprintUiMach", lpparam.classLoader); + Class OnScreenFingerprint; + try { + OnScreenFingerprint = findClass("com.oplus.systemui.biometrics.finger.udfps.OnScreenFingerprintUiMach", lpparam.classLoader); + } catch (Throwable t) { + OnScreenFingerprint = findClass("com.oplus.systemui.keyguard.finger.onscreenfingerprint.OnScreenFingerprintUiMech", lpparam.classLoader); + } hookAllMethods(OnScreenFingerprint, "initFpIconWin", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/LockscreenClock.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/LockscreenClock.java index 9fbd3e566..4a93db93b 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/LockscreenClock.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/lockscreen/LockscreenClock.java @@ -266,7 +266,12 @@ protected void afterHookedMethod(MethodHookParam param) { } }); - Class SingleClockView = findClass("com.oplus.systemui.shared.clocks.SingleClockView", lpparam.classLoader); + Class SingleClockView; + try { + SingleClockView = findClass("com.oplus.systemui.shared.clocks.SingleClockView", lpparam.classLoader); + } catch (Throwable t) { + SingleClockView = findClass("com.oplusos.systemui.keyguard.clock.SingleClockView", lpparam.classLoader); // OOS 13 + } findAndHookMethod(SingleClockView, "updateStandardTime", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { @@ -282,7 +287,12 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - Class RedTextClock = findClass("com.oplus.systemui.shared.clocks.RedTextClock", lpparam.classLoader); + Class RedTextClock; + try { + RedTextClock = findClass("com.oplus.systemui.shared.clocks.RedTextClock", lpparam.classLoader); + } catch (Throwable t) { + RedTextClock = findClass("com.oplusos.systemui.keyguard.clock.RedTextClock", lpparam.classLoader); // OOS 13 + } findAndHookMethod(RedTextClock, "onTimeChanged", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/BatteryStyleManager.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/BatteryStyleManager.java index 3456bf3a2..e5f51ad4f 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/BatteryStyleManager.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/BatteryStyleManager.java @@ -291,7 +291,7 @@ public void updatePrefs(String... Key) { public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { if (!listensTo(lpparam.packageName)) return; - Class StatBatteryMeterView = findClass("com.oplus.systemui.statusbar.pipeline.battery.ui.view.StatBatteryMeterView", lpparam.classLoader); + //Class StatBatteryMeterView = findClass("com.oplus.systemui.statusbar.pipeline.battery.ui.view.StatBatteryMeterView", lpparam.classLoader); Class BatteryIconColor = findClass("com.oplus.systemui.statusbar.pipeline.battery.ui.model.BatteryIconColor", lpparam.classLoader); findAndHookConstructor(BatteryIconColor, diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderClock.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderClock.java index a2816002a..f44225cd3 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderClock.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderClock.java @@ -131,8 +131,8 @@ public class HeaderClock extends XposedMods { private int stockClockDateBackgroundChipStyle; private int mAccent; - private GradientDrawable mClockChipDrawale; - private GradientDrawable mDateChipDrawale; + private GradientDrawable mClockChipDrawale = new GradientDrawable(); + private GradientDrawable mDateChipDrawale = new GradientDrawable(); private Typeface mStockClockTypeface, mStockDateTypeface; private Object OQC = null; private Object mActivityStarter = null; @@ -231,9 +231,6 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th QuickStatusBarHeader = findClass("com.android.systemui.qs.QuickStatusBarHeader", lpparam.classLoader); } - mClockChipDrawale = new GradientDrawable(); - mDateChipDrawale = new GradientDrawable(); - Class Clock = findClass("com.android.systemui.statusbar.policy.Clock", lpparam.classLoader); hookAllConstructors(Clock, new XC_MethodHook() { @Override @@ -327,8 +324,6 @@ protected void afterHookedMethod(MethodHookParam param) { hookAllMethods(OplusClockExImpl, "setTextWithRedOneStyleInternal", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) { - //log("setTextWithRedOneStyleInternal BEFORE"); - //log("showHeaderClock: " + showHeaderClock + " stockClockRedStyle: " + stockClockRedStyle + " stockClockRedOverrideColor: " + stockClockRedOverrideColor + " param: " + (showHeaderClock || stockClockRedStyle == 1)); if (showHeaderClock || stockClockRedStyle == 1 ) { param.setResult(null); return; @@ -401,7 +396,12 @@ protected void afterHookedMethod(MethodHookParam param) { } - Class QSSecurityFooterUtilsClass = findClass("com.android.systemui.qs.QSSecurityFooterUtils", lpparam.classLoader); + Class QSSecurityFooterUtilsClass; + try { + QSSecurityFooterUtilsClass = findClass("com.android.systemui.qs.QSSecurityFooterUtils", lpparam.classLoader); + } catch (Throwable t) { + QSSecurityFooterUtilsClass = findClass("com.android.systemui.qs.QSSecurityFooter", lpparam.classLoader); + } hookAllConstructors(QSSecurityFooterUtilsClass, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/QSTiles.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/QSTiles.java index 357b276cc..3a478d13d 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/QSTiles.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/QSTiles.java @@ -111,24 +111,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); - Class OplusHeaderTileLayout = findClass("com.oplus.systemui.qs.widget.OplusHeaderTileLayout", lpparam.classLoader); - hookAllMethods(OplusHeaderTileLayout, "updateColumns", - new XC_MethodHook() { - @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - if (!mCustomizeQSTiles) return; - - log("OplusHeaderTileLayout updateColumns"); - - int mColumns = getIntField(param.thisObject, "mColumns"); - int orientation = mContext.getResources().getConfiguration().orientation; - int newColumns = orientation == Configuration.ORIENTATION_PORTRAIT ? QSColQty : QSColQtyL; - setIntField(param.thisObject, "mColumns", 8); - param.setResult(mColumns != 8); - - } - }); - } @Override diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarClock.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarClock.java index e26f8252e..8fb4e65e8 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarClock.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarClock.java @@ -246,9 +246,17 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } ViewGroup mStatusBar = (ViewGroup) getObjectField(mCollapsedStatusBarFragment, "mStatusBar"); - mStatusbarStartSide = mStatusBar.findViewById(mContext.getResources().getIdentifier("status_bar_start_side_except_heads_up", "id", mContext.getPackageName())); + try { + mStatusbarStartSide = mStatusBar.findViewById(mContext.getResources().getIdentifier("status_bar_start_side_except_heads_up", "id", mContext.getPackageName())); + } catch (Throwable t) { + mStatusbarStartSide = mStatusBar.findViewById(mContext.getResources().getIdentifier("status_bar_left_side", "id", mContext.getPackageName())); // OOS 13 + } - mSystemIconArea = mStatusBar.findViewById(mContext.getResources().getIdentifier("statusIcons", "id", mContext.getPackageName())); + try { + mSystemIconArea = mStatusBar.findViewById(mContext.getResources().getIdentifier("statusIcons", "id", mContext.getPackageName())); + } catch (Throwable t) { + mSystemIconArea = mStatusBar.findViewById(mContext.getResources().getIdentifier("system_icon_area", "id", mContext.getPackageName())); // OOS 13 + } try { diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarMods.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarMods.java index f6520a027..1d092c4f0 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarMods.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarMods.java @@ -113,6 +113,7 @@ public class StatusbarMods extends XposedMods { private Object mNotificationIconContainer = null; private boolean mNewIconStyle; private boolean mNotificationCount; + private boolean oos13 = false; public StatusbarMods(Context context) { super(context); @@ -191,6 +192,7 @@ public boolean onDoubleTap(@NonNull MotionEvent e) { try { NotificationPanelViewControllerClass = findClass("com.android.systemui.shade.NotificationPanelViewController", lpparam.classLoader); } catch (Throwable e) { + oos13 = true; NotificationPanelViewControllerClass = findClass("com.android.systemui.statusbar.phone.NotificationPanelViewController", lpparam.classLoader); } Class PhoneStatusBarView = findClass("com.android.systemui.statusbar.phone.PhoneStatusBarView", lpparam.classLoader); @@ -199,11 +201,13 @@ public boolean onDoubleTap(@NonNull MotionEvent e) { try { QSSecurityFooterUtilsClass = findClass("com.android.systemui.qs.QSSecurityFooterUtils", lpparam.classLoader); } catch (Throwable e) { + oos13 = true; QSSecurityFooterUtilsClass = findClass("com.android.systemui.qs.QSSecurityFooter", lpparam.classLoader); } Class QuickStatusBarHeaderClass; try { QuickStatusBarHeaderClass = findClass("com.oplus.systemui.qs.OplusQuickStatusBarHeader", lpparam.classLoader); } catch (Throwable t) { + oos13 = true; QuickStatusBarHeaderClass = findClass("com.android.systemui.qs.QuickStatusBarHeader", lpparam.classLoader); } @@ -297,7 +301,14 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - Class OplusQSFooterImpl = findClass("com.oplus.systemui.qs.OplusQSFooterImpl", lpparam.classLoader); + Class OplusQSFooterImpl; + try { + OplusQSFooterImpl = findClass("com.oplus.systemui.qs.OplusQSFooterImpl", lpparam.classLoader); + } catch (Throwable e) { + oos13 = true; + OplusQSFooterImpl = findClass("com.oplusos.systemui.qs.OplusQSFooterImpl", lpparam.classLoader); // OOS 13 + } + LongClickListener onLongClick = new LongClickListener(); hookAllMethods(OplusQSFooterImpl, "onFinishInflate", new XC_MethodHook() { @Override @@ -345,9 +356,16 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - Class QuickSettingsController = findClass("com.android.systemui.shade.QuickSettingsController", lpparam.classLoader); + Class QuickSettingsController; + try { + QuickSettingsController = findClass("com.android.systemui.shade.QuickSettingsController", lpparam.classLoader); + } catch (Throwable e) { + oos13 = true; + QuickSettingsController = findClass("com.android.systemui.statusbar.phone.NotificationPanelViewController", lpparam.classLoader); + } Class CentralSurfacesImpl = findClass("com.android.systemui.statusbar.phone.CentralSurfacesImpl", lpparam.classLoader); + hookAllMethods(QuickSettingsController, "isOpenQsEvent", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { @@ -369,8 +387,12 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); - Class OplusBrightnessControllerExImpl = findClass("com.oplus.systemui.qs.impl.OplusBrightnessControllerExImpl", lpparam.classLoader); - + Class OplusBrightnessControllerExImpl; + try { + OplusBrightnessControllerExImpl = findClass("com.oplus.systemui.qs.impl.OplusBrightnessControllerExImpl", lpparam.classLoader); + } catch (Throwable t) { + OplusBrightnessControllerExImpl = findClass("com.oplus.systemui.qs.OplusBrightnessControllerExImpl", lpparam.classLoader); // OOS 13 + } hookAllConstructors(OplusBrightnessControllerExImpl, new XC_MethodHook() { @Override @@ -400,13 +422,22 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - Class NotificationStackScrollLayoutExtImpl = findClass("com.oplus.systemui.statusbar.notification.stack.NotificationStackScrollLayoutExtImpl", lpparam.classLoader); - findAndHookMethod(NotificationStackScrollLayoutExtImpl, "initView", Context.class, new XC_MethodHook() { - @Override - protected void afterHookedMethod(MethodHookParam param) throws Throwable { - mQuickQsOffsetHeight = getIntField(param.thisObject, "mQuickQsOffsetHeight"); + if (!oos13) { + Class NotificationStackScrollLayoutExtImpl = findClass("com.oplus.systemui.statusbar.notification.stack.NotificationStackScrollLayoutExtImpl", lpparam.classLoader); + findAndHookMethod(NotificationStackScrollLayoutExtImpl, "initView", Context.class, new XC_MethodHook() { + @Override + protected void afterHookedMethod(MethodHookParam param) throws Throwable { + mQuickQsOffsetHeight = getIntField(param.thisObject, "mQuickQsOffsetHeight"); + } + }); + } else { + try { + mQuickQsOffsetHeight = mContext.getResources().getDimensionPixelSize(mContext.getResources().getIdentifier("notification_quick_qs_offset_height", "dimen", listenPackage)); + } catch (Throwable t) { + log("notification_quick_qs_offset_height not found"); } - }); + } + hookAllMethods(PhoneStatusBarViewControllerClass, "onTouch", new XC_MethodHook() { @@ -463,7 +494,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); - Class OplusQsMediaPanelView = findClass("com.oplus.systemui.qs.media.OplusQsMediaPanelView", lpparam.classLoader); // Notifications NotificationIconAreaController = findClass("com.android.systemui.statusbar.phone.NotificationIconAreaController", lpparam.classLoader); @@ -480,8 +510,6 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { mNotificationIconContainer = param.thisObject; } }); - Class ScalingDrawableWrapper = findClass("com.android.systemui.statusbar.ScalingDrawableWrapper", lpparam.classLoader); - Class FwkResIdLoader = findClass("com.oplusos.systemui.common.util.FwkResIdLoader", lpparam.classLoader); Class DrawableSize = findClass("com.android.systemui.util.drawable.DrawableSize", lpparam.classLoader); Class StatusBarIconView = findClass("com.android.systemui.statusbar.StatusBarIconView", lpparam.classLoader); findAndHookMethod(StatusBarIconView, diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarNotification.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarNotification.java index a5fbb1951..e2baa3d45 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarNotification.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/StatusbarNotification.java @@ -89,7 +89,12 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); - Class FlashlightNotification = findClass("com.oplus.systemui.statusbar.notification.flashlight.FlashlightNotification", lpparam.classLoader); + Class FlashlightNotification; + try { + FlashlightNotification = findClass("com.oplus.systemui.statusbar.notification.flashlight.FlashlightNotification", lpparam.classLoader); + } catch (Throwable t) { + FlashlightNotification = findClass("com.oplusos.systemui.flashlight.FlashlightNotification", lpparam.classLoader); // OOS 13 + } findAndHookMethod(FlashlightNotification, "sendNotification", boolean.class, new XC_MethodHook() { @Override diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml similarity index 100% rename from app/src/main/res/values-ru/strings.xml rename to app/src/main/res/values-ru-rRU/strings.xml