1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-19 13:57:14 +01:00

fix: project not building

This commit is contained in:
oSumAtrIX 2022-04-08 19:34:16 +02:00
parent 4da053804b
commit 792b6dc2ad
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
4 changed files with 19 additions and 11 deletions

View File

@ -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);
}

View File

@ -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");

View File

@ -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();
}
}

View File

@ -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;