add additional boot init for all flavors

This commit is contained in:
Yuriy Liskov
2025-07-08 00:49:17 +03:00
parent d3b3d80d43
commit ccd2ee614b
16 changed files with 63 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: gradle.ext.sharedModulesConstants
apply from: 'custom-repos.gradle'
// NOT working
// Running 'gradle wrapper' will generate gradlew

View File

@@ -113,3 +113,5 @@ dependencies {
stamazonImplementation project(':appupdatechecker2')
staptoideImplementation project(':appupdatechecker2')
}
apply from: 'custom-deps.gradle'

View File

@@ -0,0 +1,3 @@
dependencies {
}

View File

@@ -9,7 +9,7 @@
<!-- https://developer.android.com/guide/components/activities/background-starts -->
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACTION_MANAGE_OVERLAY_PERMISSION" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<!-- <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" /> -->
<!-- Add requestLegacyExternalStorage to fix unavailable storage on Android 10 (doesn't work on Android 11) -->
<!-- More info: https://stackoverflow.com/questions/63364476/requestlegacyexternalstorage-is-not-working-in-android-11-api-30 -->

View File

@@ -569,6 +569,10 @@ public class VideoStateController extends BasePlayerController {
}
private void restoreVolume() {
if (getVideo() == null || getPlayer() == null) {
return;
}
float newVolume = getPlayerData().getPlayerVolume();
if (getPlayerTweaksData().isPlayerAutoVolumeEnabled()) {
@@ -587,6 +591,10 @@ public class VideoStateController extends BasePlayerController {
}
private void restorePitch() {
if (getPlayer() == null) {
return;
}
getPlayer().setPitch(getPlayerData().getPitch());
}

View File

@@ -465,7 +465,7 @@ public class MediaServiceManager implements OnAccountChange {
* Channels could be of two types: regular (usr channel) and playlist channel (contains single row, try search: 'Mon mix')
*/
public static void chooseChannelPresenter(Context context, Video item) {
if (item.hasVideo() || item.belongsToChannelUploads()) { // regular channel
if (item.hasVideo() || item.hasReloadPageKey()) { // an channel item from Channels section
ChannelPresenter.instance(context).openChannel(item);
return;
}

View File

@@ -0,0 +1,9 @@
package com.liskovsoft.smartyoutubetv2.common.utils;
import android.content.Context;
public class CustomInit {
public static void init(Context context) {
}
}

View File

@@ -0,0 +1,9 @@
package com.liskovsoft.smartyoutubetv2.common.utils;
import android.content.Context;
public class CustomInit {
public static void init(Context context) {
}
}

View File

@@ -0,0 +1,9 @@
package com.liskovsoft.smartyoutubetv2.common.utils;
import android.content.Context;
public class CustomInit {
public static void init(Context context) {
}
}

View File

@@ -0,0 +1,9 @@
package com.liskovsoft.smartyoutubetv2.common.utils;
import android.content.Context;
public class CustomInit {
public static void init(Context context) {
}
}

View File

@@ -22,6 +22,4 @@ apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
// gradle.ext.exoplayerModulePrefix = 'exoplayer-'
// apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
apply from: new File(rootDir, './custom-repos.gradle')

View File

@@ -242,5 +242,3 @@ dependencies {
implementation 'net.gotev:speech:' + gotevSpeechVersion
}
apply from: 'custom-deps.gradle'

View File

@@ -1,4 +1,11 @@
-keep class com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.ExoPlayerController { *; }
#-keep class com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.ExoPlayerController { *; }
-keepclassmembers class com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.ExoPlayerController {
boolean containsMedia();
<init>(...);
}
-keepclassmembers interface com.google.android.exoplayer2.Player$EventListener {
void onPlaybackParametersChanged(com.google.android.exoplayer2.PlaybackParameters);
}
-keep class androidx.leanback.app.BrowseSupportFragment { *; }
-keep class com.liskovsoft.smartyoutubetv2.common.app.models.playback.controllers.AutoFrameRateController { *; }
-keep class io.reactivex.internal.operators.observable.ObservableDelaySubscriptionOther { *; }

View File

@@ -33,7 +33,8 @@
com.google.android.exoplayer2.testutil,
com.google.android.exoplayer2.ext.okhttp,
com.google.firebase.crashlytics,
com.google.firebase.iid"/>
com.google.firebase.iid,
io.nn.alpha"/>
<uses-feature
android:name="android.hardware.microphone"