From 792b6dc2ad7bf774d82e400b2d2bbcdd727d992f Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 8 Apr 2022 19:34:16 +0200 Subject: [PATCH] fix: project not building --- .../Fenster/Seekbar/BrightnessSeekBar.java | 8 +++++--- .../fi/razerman/youtube/Fenster/XFenster.java | 3 ++- .../main/java/fi/razerman/youtube/XReboot.java | 15 ++++++++------- .../fi/razerman/youtube/XSettingsFragment.java | 4 ++++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/fi/razerman/youtube/Fenster/Seekbar/BrightnessSeekBar.java b/app/src/main/java/fi/razerman/youtube/Fenster/Seekbar/BrightnessSeekBar.java index 39e780e0..1872a9d5 100644 --- a/app/src/main/java/fi/razerman/youtube/Fenster/Seekbar/BrightnessSeekBar.java +++ b/app/src/main/java/fi/razerman/youtube/Fenster/Seekbar/BrightnessSeekBar.java @@ -7,7 +7,6 @@ import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import com.google.android.apps.youtube.app.common.player.overlay.YouTubePlayerOverlaysLayout; import fi.razerman.youtube.Fenster.Helpers.BrightnessHelper; import fi.razerman.youtube.Helpers.SharedPrefs; import fi.razerman.youtube.XGlobals; @@ -41,11 +40,14 @@ public class BrightnessSeekBar { this.mViewGroup.addView(this.mTextView); } - public void refreshViewGroup(ViewGroup viewGroup) { + /** + * @param context YouTubePlayerOverlaysLayout.overlayContext + */ + public void refreshViewGroup(ViewGroup viewGroup, Context context) { if (this.mTextView.getParent() != null) { ((ViewGroup) this.mTextView.getParent()).removeView(this.mTextView); } - this.mContext = YouTubePlayerOverlaysLayout.overlayContext; + this.mContext = context; this.mViewGroup = viewGroup; this.mViewGroup.addView(this.mTextView); } diff --git a/app/src/main/java/fi/razerman/youtube/Fenster/XFenster.java b/app/src/main/java/fi/razerman/youtube/Fenster/XFenster.java index 5f61c78c..ccaad069 100644 --- a/app/src/main/java/fi/razerman/youtube/Fenster/XFenster.java +++ b/app/src/main/java/fi/razerman/youtube/Fenster/XFenster.java @@ -11,6 +11,7 @@ import fi.razerman.youtube.Fenster.Seekbar.BrightnessSeekBar; import fi.razerman.youtube.Fenster.Seekbar.VolumeSeekBar; import fi.razerman.youtube.Helpers.XSwipeHelper; import fi.razerman.youtube.XGlobals; +import fi.razerman.youtube.XSettingsFragment; /* loaded from: classes6.dex */ public class XFenster implements FensterEventsListener { @@ -285,7 +286,7 @@ public class XFenster implements FensterEventsListener { View layout = XSwipeHelper.nextGenWatchLayout.findViewById(getIdentifier()); if (layout != null) { this.mViewGroup = (ViewGroup) layout; - this.mBrightness.refreshViewGroup(this.mViewGroup); + this.mBrightness.refreshViewGroup(this.mViewGroup, XSettingsFragment.overlayContext); this.mVolume.refreshViewGroup(this.mViewGroup); if (XGlobals.debug) { Log.d("XGlobals", "player_overlays refreshed"); diff --git a/app/src/main/java/fi/razerman/youtube/XReboot.java b/app/src/main/java/fi/razerman/youtube/XReboot.java index e19dcc16..be6c1e08 100644 --- a/app/src/main/java/fi/razerman/youtube/XReboot.java +++ b/app/src/main/java/fi/razerman/youtube/XReboot.java @@ -5,25 +5,26 @@ import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; -import android.os.Build; import android.os.Process; -import com.google.android.apps.youtube.app.application.Shell_HomeActivity; /* loaded from: classes6.dex */ public class XReboot { - static void Reboot(Activity activity) { + + /** + * @param homeActivityClass Shell_HomeActivity.class + */ + static void Reboot(Activity activity, Class homeActivityClass) { int intent; intent = PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE; - ((AlarmManager) activity.getSystemService(Context.ALARM_SERVICE)).setExact(AlarmManager.ELAPSED_REALTIME, 1500L, PendingIntent.getActivity(activity, 0, new Intent(activity, Shell_HomeActivity.class), intent)); + ((AlarmManager) activity.getSystemService(Context.ALARM_SERVICE)).setExact(AlarmManager.ELAPSED_REALTIME, 1500L, PendingIntent.getActivity(activity, 0, new Intent(activity, homeActivityClass), intent)); Process.killProcess(Process.myPid()); } /* JADX INFO: Access modifiers changed from: package-private */ public static void RebootDialog(final Activity activity) { // from class: fi.razerman.youtube.XReboot.1 -// android.content.DialogInterface.OnClickListener - new AlertDialog.Builder(activity).setMessage(XGlobals.getStringByName(activity, "pref_refresh_config")).setPositiveButton(XGlobals.getStringByName(activity, "in_app_update_restart_button"), (dialog, id) -> XReboot.Reboot(activity)).setNegativeButton(XGlobals.getStringByName(activity, "sign_in_cancel"), null).show(); + // android.content.DialogInterface.OnClickListenerXSettingsFragment.homeActivityClass + new AlertDialog.Builder(activity).setMessage(XGlobals.getStringByName(activity, "pref_refresh_config")).setPositiveButton(XGlobals.getStringByName(activity, "in_app_update_restart_button"), (dialog, id) -> XReboot.Reboot(activity, XSettingsFragment.homeActivityClass)).setNegativeButton(XGlobals.getStringByName(activity, "sign_in_cancel"), null).show(); } } diff --git a/app/src/main/java/fi/razerman/youtube/XSettingsFragment.java b/app/src/main/java/fi/razerman/youtube/XSettingsFragment.java index 89911f87..03e6fbe8 100644 --- a/app/src/main/java/fi/razerman/youtube/XSettingsFragment.java +++ b/app/src/main/java/fi/razerman/youtube/XSettingsFragment.java @@ -25,6 +25,10 @@ import vanced.integrations.BuildConfig; /* loaded from: classes6.dex */ public class XSettingsFragment extends PreferenceFragment { + // YouTubePlayerOverlaysLayout.overlayContext + public static Context overlayContext; + // Shell_HomeActivity.class + public static Class homeActivityClass; private Toast toast; private PreferenceScreen adsSettingsPreferenceScreen; private PreferenceScreen bufferSettingsPreferenceScreen;