From 85f3ba4d91657fcbe01989306a27f28e8042a77d Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 22:36:41 -0800 Subject: [PATCH 1/6] Update .gitignore --- .gitignore | 262 +++----------------------- .idea/compiler.xml | 22 --- .idea/copyright/profiles_settings.xml | 3 - .idea/gradle.xml | 18 -- .idea/modules.xml | 10 - .idea/runConfigurations.xml | 12 -- 6 files changed, 28 insertions(+), 299 deletions(-) delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations.xml diff --git a/.gitignore b/.gitignore index 66fc3ff..a68e5b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,236 +1,30 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -/python/temp_apk -/python/*.log -/python/leanback_shortcuts -/python/to_generate.json -/python/leanbackshortcut.pyc +# Gradle files +.gradle/ +build/ -# Built application files - -*.apk - -*.ap_ - - -# Files for the ART/Dalvik VM - -*.dex - - -# Java class files - -*.class - - -# Generated files - -bin/ -gen/ -out/ - - -# Gradle files - -.gradle/ -build/ - - -# Local configuration file (sdk path, etc) - -local.properties - - -# Proguard folder generated by Eclipse -proguard/ - - -# Log Files - -*.log - - -# Android Studio Navigation editor temp files -. -navigation/ - - -# Android Studio captures -folder -captures/ - - -# Intellij - -*.iml - -.idea/workspace.xml - - -# Keystore files - -*.jks - -.idea/ - -# For python keys -python/keys.txt -app/google-services.json - -*.apk - -*.ap_ - - -# Files for the ART/Dalvik VM - -*.dex - - -# Java class files - -*.class - - -# Generated files -/python/keys.txt -# Built application files -*.apk -*.ap_ - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files - -bin/ -gen/ -out/ - - - -# Gradle files - -.gradle/ -build/ - - -# Local configuration file (sdk path, etc) - -local.properties - - -# Proguard folder generated by Eclipse -proguard/ - - -# Log Files - -*.log - - -# Android Studio Navigation editor temp files -. -navigation/ - - -# Android Studio captures -folder -captures/ - - -# Intellij - -*.iml - -.idea/workspace.xml - - -# Keystore files - -*.jks - -.idea/ - -# For python keys -python/keys.txt -app/google-services.json -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# Intellij -*.iml -.idea/workspace.xml - -# Keystore files -*.jks -.idea/ -/python/keys.txt - -# Built application files -*.apk -*.ap_ - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# Intellij -*.iml -.idea/workspace.xml - -# Keystore files -*.jks -.idea/ +# Local configuration file (sdk path, etc) +local.properties + +# Log/OS Files +*.log + +# Android Studio generated files and folders +captures/ +.externalNativeBuild/ +.cxx/ +*.apk +output.json + +# IntelliJ +*.iml +.idea/ + +# Keystore files +*.jks +*.keystore + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Android Profiling *.hprof diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index c7d1c5a..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 7ac24c7..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 5fd4831..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file From 149285be79bc6a1655866463dda24be6c84576c1 Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 22:42:26 -0800 Subject: [PATCH 2/6] Enable converting AdaptiveIconDrawable to bitmap and byte[] --- .../infogue/modules/VolleyMultipartRequest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java b/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java index 0816824..7217dd2 100644 --- a/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java +++ b/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java @@ -2,6 +2,7 @@ import android.content.Context; import android.graphics.Bitmap; +import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.support.v4.content.ContextCompat; @@ -342,9 +343,17 @@ public static byte[] getFileDataFromDrawable(Context context, int id) { * @return byte array */ public static byte[] getFileDataFromDrawable(Context context, Drawable drawable) { - Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap(); + Bitmap bitmap = getBitmapFromDrawable(drawable); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); return byteArrayOutputStream.toByteArray(); } -} \ No newline at end of file + + private static Bitmap getBitmapFromDrawable(Drawable drawable) { + final Bitmap bmp = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); + final Canvas canvas = new Canvas(bmp); + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); + drawable.draw(canvas); + return bmp; + } +} From 3d15801e80292a16d5b90e9398ad658d61d6936a Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 23:06:44 -0800 Subject: [PATCH 3/6] Disable Crashlytics --- app/build.gradle | 7 ------- .../tvapprepo/activities/MainActivity.java | 13 ------------- .../androidtv/tvapprepo/fragments/MainFragment.java | 1 - 3 files changed, 21 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c9f2ddd..01a69dd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,18 +35,14 @@ android { buildscript { repositories { mavenCentral() - maven { url 'https://maven.fabric.io/public' } } dependencies { - classpath 'io.fabric.tools:gradle:1.22.0' } } -apply plugin: 'io.fabric' repositories { mavenCentral() - maven { url 'https://maven.fabric.io/public' } } ext { @@ -71,9 +67,6 @@ dependencies { compile 'com.afollestad.material-dialogs:core:0.9.0.2' compile 'com.android.volley:volley:1.0.0' - compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { - transitive = true; - } androidTestCompile 'com.android.support:support-annotations:25.3.1' androidTestCompile 'com.android.support.test:runner:0.5' diff --git a/app/src/main/java/news/androidtv/tvapprepo/activities/MainActivity.java b/app/src/main/java/news/androidtv/tvapprepo/activities/MainActivity.java index 5841cd7..b0b6643 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/activities/MainActivity.java +++ b/app/src/main/java/news/androidtv/tvapprepo/activities/MainActivity.java @@ -16,13 +16,7 @@ import android.app.Activity; import android.os.Bundle; -import android.support.v4.media.MediaMetadataCompat; -import com.crashlytics.android.Crashlytics; - -import io.fabric.sdk.android.Fabric; -import io.fabric.sdk.android.services.concurrency.DependsOn; -import news.androidtv.tvapprepo.PrivateUtils; import news.androidtv.tvapprepo.R; /* @@ -36,12 +30,5 @@ public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - Fabric.with(this, new Crashlytics()); -// checkSelfVersion(); - } - - @Deprecated - public void checkSelfVersion() { - // Make a call to Firebase } } diff --git a/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java b/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java index 60fad95..5e2a459 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java +++ b/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java @@ -50,7 +50,6 @@ import java.util.Timer; import java.util.TimerTask; -import io.fabric.sdk.android.Fabric; import news.androidtv.tvapprepo.R; import news.androidtv.tvapprepo.Utils; import news.androidtv.tvapprepo.activities.DetailsActivity; From 1636193a9a5b657bbd572c7836cbf6ae30fb2ca1 Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 23:13:07 -0800 Subject: [PATCH 4/6] Modernize gradle --- app/build.gradle | 43 ++++++++++--------- app/google-services.json | 4 +- app/src/main/AndroidManifest.xml | 5 ++- .../tvapprepo/utils/ShortcutPostTask.java | 3 ++ build.gradle | 13 +++--- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- gradlew | 0 8 files changed, 39 insertions(+), 35 deletions(-) mode change 100644 => 100755 gradlew diff --git a/app/build.gradle b/app/build.gradle index 01a69dd..0e8ca32 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.application' +apply plugin: 'com.google.gms.google-services' android { - compileSdkVersion 25 - buildToolsVersion "24.0.2" + compileSdkVersion 31 defaultConfig { applicationId "news.androidtv.tvapprepo" @@ -22,10 +22,13 @@ android { debug { } } + flavorDimensions "version" productFlavors { opencommunity { + dimension "version" } playstore { + dimension "version" applicationIdSuffix '.playstore' versionNameSuffix '-playstore' } @@ -51,27 +54,25 @@ ext { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile "com.android.support:recyclerview-v7:$project.ext.supportLibrary" - compile "com.android.support:leanback-v17:$project.ext.supportLibrary" - compile "com.android.support:preference-leanback-v17:$project.ext.supportLibrary" - compile "com.android.support:appcompat-v7:$project.ext.supportLibrary" - compile "com.android.support:palette-v7:$project.ext.supportLibrary" + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "com.android.support:recyclerview-v7:$project.ext.supportLibrary" + implementation "com.android.support:leanback-v17:$project.ext.supportLibrary" + implementation "com.android.support:preference-leanback-v17:$project.ext.supportLibrary" + implementation "com.android.support:appcompat-v7:$project.ext.supportLibrary" + implementation "com.android.support:palette-v7:$project.ext.supportLibrary" - compile "com.google.firebase:firebase-database:$project.ext.googlePlayServices" - compile "com.google.android.gms:play-services-ads:$project.ext.googlePlayServices" - compile "com.google.firebase:firebase-config:$project.ext.googlePlayServices" - compile "com.google.firebase:firebase-ads:$project.ext.googlePlayServices" + implementation "com.google.firebase:firebase-database:$project.ext.googlePlayServices" + implementation "com.google.android.gms:play-services-ads:$project.ext.googlePlayServices" + implementation "com.google.firebase:firebase-config:$project.ext.googlePlayServices" + implementation "com.google.firebase:firebase-ads:$project.ext.googlePlayServices" - compile 'com.github.bumptech.glide:glide:3.7.0' - compile 'com.afollestad.material-dialogs:core:0.9.0.2' - compile 'com.android.volley:volley:1.0.0' + implementation 'com.github.bumptech.glide:glide:3.7.0' + implementation 'com.afollestad.material-dialogs:core:0.9.0.2' + implementation 'com.android.volley:volley:1.2.1' - androidTestCompile 'com.android.support:support-annotations:25.3.1' - androidTestCompile 'com.android.support.test:runner:0.5' - androidTestCompile 'com.android.support.test:rules:0.5' - androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' + androidTestImplementation 'com.android.support:support-annotations:25.3.1' + androidTestImplementation 'com.android.support.test:runner:0.5' + androidTestImplementation 'com.android.support.test:rules:0.5' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2' } - -apply plugin: 'com.google.gms.google-services' diff --git a/app/google-services.json b/app/google-services.json index 49b6183..8f73dae 100644 --- a/app/google-services.json +++ b/app/google-services.json @@ -10,7 +10,7 @@ "client_info": { "mobilesdk_app_id": "1:29919293682:android:c87c1e28f04cf198", "android_client_info": { - "package_name": "news.androidtv.tvapprepo" + "package_name": "news.androidtv.tvapprepo.playstore" } }, "oauth_client": [ @@ -39,4 +39,4 @@ } ], "configuration_version": "1" -} \ No newline at end of file +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 46d25f7..f5f74ec 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,7 +26,8 @@ android:name=".activities.MainActivity" android:label="@string/app_name" android:logo="@drawable/banner" - android:screenOrientation="landscape"> + android:screenOrientation="landscape" + android:exported="true"> @@ -70,4 +71,4 @@ - \ No newline at end of file + diff --git a/app/src/main/java/news/androidtv/tvapprepo/utils/ShortcutPostTask.java b/app/src/main/java/news/androidtv/tvapprepo/utils/ShortcutPostTask.java index 770e5cc..ae79265 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/utils/ShortcutPostTask.java +++ b/app/src/main/java/news/androidtv/tvapprepo/utils/ShortcutPostTask.java @@ -2,6 +2,9 @@ import android.content.Context; import android.content.pm.ResolveInfo; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.drawable.Drawable; import android.util.Log; import android.widget.Toast; diff --git a/build.gradle b/build.gradle index d890b3f..0132f4a 100644 --- a/build.gradle +++ b/build.gradle @@ -2,11 +2,12 @@ buildscript { repositories { - jcenter() + google() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.0' - classpath 'com.google.gms:google-services:3.1.1' + classpath 'com.android.tools.build:gradle:7.0.3' + classpath 'com.google.gms:google-services:4.3.10' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -14,10 +15,8 @@ buildscript { allprojects { repositories { - jcenter() - maven { - url "https://maven.google.com" - } + google() + mavenCentral() } } diff --git a/gradle.properties b/gradle.properties index 9b6ae2a..55d18ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,4 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3d37a41..6247f07 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jan 12 18:08:02 EST 2017 +#Wed Mar 31 20:44:51 PDT 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 From fca0d0f3560dc9b06bd7368dcfabec87e286325a Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 23:15:53 -0800 Subject: [PATCH 5/6] Migrate to AndroidX --- app/build.gradle | 4 +- ...ShortcutGenerationInstrumentationTest.java | 4 +- app/src/main/AndroidManifest.xml | 2 +- .../modules/VolleyMultipartRequest.java | 2 +- .../infogue/modules/VolleySingleton.java | 4 +- .../activities/AdvancedShortcutActivity.java | 7 +--- .../activities/SimpleFormPostActivity.java | 16 +------- .../download/AbstractDownloadHelper.java | 2 +- .../fragments/AppDetailsFragment.java | 38 +++++++++---------- .../tvapprepo/fragments/ErrorFragment.java | 2 +- .../tvapprepo/fragments/MainFragment.java | 30 +++++++-------- .../tvapprepo/fragments/SettingsFragment.java | 18 ++++----- .../news/androidtv/tvapprepo/model/Apk.java | 4 +- .../tvapprepo/model/FirebaseMap.java | 2 +- .../tvapprepo/model/LeanbackShortcut.java | 2 +- .../tvapprepo/presenters/ApkPresenter.java | 8 ++-- .../tvapprepo/presenters/CardPresenter.java | 6 +-- .../DetailsDescriptionPresenter.java | 3 +- .../presenters/DownloadedFilesPresenter.java | 5 +-- .../LauncherActivitiesPresenter.java | 9 ++--- .../presenters/OptionsCardPresenter.java | 4 +- .../ui/ShortcutGeneratorDialogs.java | 4 +- .../utils/GenerateShortcutHelper.java | 4 +- .../utils/PackageInstallerUtils.java | 2 +- .../puppetmaster/tinydl/PackageInstaller.java | 10 ++--- gradle.properties | 2 + .../shortcut/ExampleInstrumentedTest.java | 4 +- 27 files changed, 89 insertions(+), 109 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0e8ca32..2218e7f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,7 +10,7 @@ android { targetSdkVersion 25 versionCode 17 versionName "1.1.4" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -57,7 +57,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "com.android.support:recyclerview-v7:$project.ext.supportLibrary" implementation "com.android.support:leanback-v17:$project.ext.supportLibrary" - implementation "com.android.support:preference-leanback-v17:$project.ext.supportLibrary" + implementation 'androidx.leanback:leanback-preference:1.0.0' implementation "com.android.support:appcompat-v7:$project.ext.supportLibrary" implementation "com.android.support:palette-v7:$project.ext.supportLibrary" diff --git a/app/src/androidTest/java/news/androidtv/tvapprepo/ShortcutGenerationInstrumentationTest.java b/app/src/androidTest/java/news/androidtv/tvapprepo/ShortcutGenerationInstrumentationTest.java index 71665fc..26575ae 100644 --- a/app/src/androidTest/java/news/androidtv/tvapprepo/ShortcutGenerationInstrumentationTest.java +++ b/app/src/androidTest/java/news/androidtv/tvapprepo/ShortcutGenerationInstrumentationTest.java @@ -4,8 +4,8 @@ import android.content.pm.ApplicationInfo; import android.content.pm.ResolveInfo; import android.graphics.Bitmap; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.rule.ActivityTestRule; +import androidx.test.ext.junit.runners.AndroidJUnit4; import android.util.Log; import com.android.volley.VolleyError; diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f5f74ec..45278f4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -39,7 +39,7 @@ diff --git a/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java b/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java index 7217dd2..425df66 100644 --- a/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java +++ b/app/src/main/java/com/sketchproject/infogue/modules/VolleyMultipartRequest.java @@ -5,7 +5,7 @@ import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import com.android.volley.AuthFailureError; diff --git a/app/src/main/java/com/sketchproject/infogue/modules/VolleySingleton.java b/app/src/main/java/com/sketchproject/infogue/modules/VolleySingleton.java index 0426fb9..4c43545 100644 --- a/app/src/main/java/com/sketchproject/infogue/modules/VolleySingleton.java +++ b/app/src/main/java/com/sketchproject/infogue/modules/VolleySingleton.java @@ -2,7 +2,7 @@ import android.content.Context; import android.graphics.Bitmap; -import android.support.v4.util.LruCache; +import androidx.collection.LruCache; import com.android.volley.Request; import com.android.volley.RequestQueue; @@ -91,4 +91,4 @@ public void addToRequestQueue(Request req) { public ImageLoader getImageLoader() { return mImageLoader; } -} \ No newline at end of file +} diff --git a/app/src/main/java/news/androidtv/tvapprepo/activities/AdvancedShortcutActivity.java b/app/src/main/java/news/androidtv/tvapprepo/activities/AdvancedShortcutActivity.java index 041e91b..ed2e574 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/activities/AdvancedShortcutActivity.java +++ b/app/src/main/java/news/androidtv/tvapprepo/activities/AdvancedShortcutActivity.java @@ -2,14 +2,11 @@ import android.app.Activity; import android.content.ComponentName; -import android.content.DialogInterface; -import android.content.Intent; import android.content.pm.ResolveInfo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; import android.util.Log; -import android.view.ContextThemeWrapper; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/news/androidtv/tvapprepo/activities/SimpleFormPostActivity.java b/app/src/main/java/news/androidtv/tvapprepo/activities/SimpleFormPostActivity.java index 3e20086..f336d55 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/activities/SimpleFormPostActivity.java +++ b/app/src/main/java/news/androidtv/tvapprepo/activities/SimpleFormPostActivity.java @@ -2,11 +2,8 @@ import android.app.Activity; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.net.Uri; -import android.os.AsyncTask; -import android.os.Bundle; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; import android.util.Base64; import android.util.Log; import android.view.KeyEvent; @@ -18,19 +15,10 @@ import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; -import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.sketchproject.infogue.modules.VolleyMultipartRequest; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; import java.util.HashMap; import java.util.Map; diff --git a/app/src/main/java/news/androidtv/tvapprepo/download/AbstractDownloadHelper.java b/app/src/main/java/news/androidtv/tvapprepo/download/AbstractDownloadHelper.java index 5c78a60..b006235 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/download/AbstractDownloadHelper.java +++ b/app/src/main/java/news/androidtv/tvapprepo/download/AbstractDownloadHelper.java @@ -1,7 +1,7 @@ package news.androidtv.tvapprepo.download; import android.app.Activity; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; diff --git a/app/src/main/java/news/androidtv/tvapprepo/fragments/AppDetailsFragment.java b/app/src/main/java/news/androidtv/tvapprepo/fragments/AppDetailsFragment.java index 17062b5..ef94b78 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/fragments/AppDetailsFragment.java +++ b/app/src/main/java/news/androidtv/tvapprepo/fragments/AppDetailsFragment.java @@ -22,29 +22,27 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.v17.leanback.app.BackgroundManager; -import android.support.v17.leanback.app.DetailsFragment; -import android.support.v17.leanback.widget.Action; -import android.support.v17.leanback.widget.ArrayObjectAdapter; -import android.support.v17.leanback.widget.ClassPresenterSelector; -import android.support.v17.leanback.widget.DetailsOverviewRow; -import android.support.v17.leanback.widget.DetailsOverviewRowPresenter; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.ListRow; -import android.support.v17.leanback.widget.ListRowPresenter; -import android.support.v17.leanback.widget.OnItemViewClickedListener; -import android.support.v17.leanback.widget.Presenter; -import android.support.v17.leanback.widget.Row; -import android.support.v17.leanback.widget.RowPresenter; -import android.support.v17.leanback.widget.SparseArrayObjectAdapter; -import android.support.v4.app.ActivityOptionsCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; +import androidx.leanback.app.BackgroundManager; +import androidx.leanback.app.DetailsFragment; +import androidx.leanback.widget.Action; +import androidx.leanback.widget.ArrayObjectAdapter; +import androidx.leanback.widget.ClassPresenterSelector; +import androidx.leanback.widget.DetailsOverviewRow; +import androidx.leanback.widget.DetailsOverviewRowPresenter; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.ListRow; +import androidx.leanback.widget.ListRowPresenter; +import androidx.leanback.widget.OnItemViewClickedListener; +import androidx.leanback.widget.Presenter; +import androidx.leanback.widget.Row; +import androidx.leanback.widget.RowPresenter; +import androidx.leanback.widget.SparseArrayObjectAdapter; +import androidx.core.app.ActivityOptionsCompat; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; import android.util.DisplayMetrics; import android.util.Log; import android.view.ContextThemeWrapper; -import android.view.View; -import android.widget.AdapterView; import android.widget.Toast; import com.bumptech.glide.Glide; diff --git a/app/src/main/java/news/androidtv/tvapprepo/fragments/ErrorFragment.java b/app/src/main/java/news/androidtv/tvapprepo/fragments/ErrorFragment.java index bee72bc..6cd8eae 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/fragments/ErrorFragment.java +++ b/app/src/main/java/news/androidtv/tvapprepo/fragments/ErrorFragment.java @@ -22,7 +22,7 @@ /* * This class demonstrates how to extend ErrorFragment */ -public class ErrorFragment extends android.support.v17.leanback.app.ErrorFragment { +public class ErrorFragment extends androidx.leanback.app.ErrorFragment { private static final String TAG = "ErrorFragment"; private static final boolean TRANSLUCENT = true; diff --git a/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java b/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java index 5e2a459..a096d62 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java +++ b/app/src/main/java/news/androidtv/tvapprepo/fragments/MainFragment.java @@ -10,21 +10,21 @@ import android.os.Environment; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; -import android.support.v17.leanback.app.BackgroundManager; -import android.support.v17.leanback.app.BrowseFragment; -import android.support.v17.leanback.widget.ArrayObjectAdapter; -import android.support.v17.leanback.widget.HeaderItem; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.ListRow; -import android.support.v17.leanback.widget.ListRowPresenter; -import android.support.v17.leanback.widget.OnItemViewClickedListener; -import android.support.v17.leanback.widget.OnItemViewSelectedListener; -import android.support.v17.leanback.widget.Presenter; -import android.support.v17.leanback.widget.Row; -import android.support.v17.leanback.widget.RowPresenter; -import android.support.v4.app.ActivityOptionsCompat; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.leanback.app.BackgroundManager; +import androidx.leanback.app.BrowseFragment; +import androidx.leanback.widget.ArrayObjectAdapter; +import androidx.leanback.widget.HeaderItem; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.ListRow; +import androidx.leanback.widget.ListRowPresenter; +import androidx.leanback.widget.OnItemViewClickedListener; +import androidx.leanback.widget.OnItemViewSelectedListener; +import androidx.leanback.widget.Presenter; +import androidx.leanback.widget.Row; +import androidx.leanback.widget.RowPresenter; +import androidx.core.app.ActivityOptionsCompat; +import androidx.appcompat.app.AlertDialog; import android.util.DisplayMetrics; import android.util.Log; import android.view.ContextThemeWrapper; diff --git a/app/src/main/java/news/androidtv/tvapprepo/fragments/SettingsFragment.java b/app/src/main/java/news/androidtv/tvapprepo/fragments/SettingsFragment.java index a96e083..6f4f47d 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/fragments/SettingsFragment.java +++ b/app/src/main/java/news/androidtv/tvapprepo/fragments/SettingsFragment.java @@ -2,14 +2,14 @@ import android.os.Bundle; import android.os.Environment; -import android.support.v14.preference.PreferenceFragment; -import android.support.v17.preference.LeanbackPreferenceFragment; -import android.support.v17.preference.LeanbackSettingsFragment; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.DialogPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceScreen; -import android.support.v7.view.ContextThemeWrapper; +import androidx.preference.PreferenceFragment; +import androidx.leanback.preference.LeanbackPreferenceFragment; +import androidx.leanback.preference.LeanbackSettingsFragment; +import androidx.appcompat.app.AlertDialog; +import androidx.preference.DialogPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceScreen; +import androidx.appcompat.view.ContextThemeWrapper; import android.util.Log; import android.widget.Toast; @@ -115,4 +115,4 @@ private void deleteApks(File directory) { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/news/androidtv/tvapprepo/model/Apk.java b/app/src/main/java/news/androidtv/tvapprepo/model/Apk.java index ecf3b0d..eed9e96 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/model/Apk.java +++ b/app/src/main/java/news/androidtv/tvapprepo/model/Apk.java @@ -1,6 +1,6 @@ package news.androidtv.tvapprepo.model; -import android.support.annotation.Keep; +import androidx.annotation.Keep; import android.util.Log; import org.json.JSONException; @@ -179,4 +179,4 @@ public Apk build() { return mApk; } } -} \ No newline at end of file +} diff --git a/app/src/main/java/news/androidtv/tvapprepo/model/FirebaseMap.java b/app/src/main/java/news/androidtv/tvapprepo/model/FirebaseMap.java index b74b899..aec44bb 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/model/FirebaseMap.java +++ b/app/src/main/java/news/androidtv/tvapprepo/model/FirebaseMap.java @@ -1,6 +1,6 @@ package news.androidtv.tvapprepo.model; -import android.support.annotation.Keep; +import androidx.annotation.Keep; import java.util.HashMap; diff --git a/app/src/main/java/news/androidtv/tvapprepo/model/LeanbackShortcut.java b/app/src/main/java/news/androidtv/tvapprepo/model/LeanbackShortcut.java index cf7effd..4918566 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/model/LeanbackShortcut.java +++ b/app/src/main/java/news/androidtv/tvapprepo/model/LeanbackShortcut.java @@ -1,6 +1,6 @@ package news.androidtv.tvapprepo.model; -import android.support.annotation.Keep; +import androidx.annotation.Keep; /** * Represents a shortcut application which simply redirects the user to the intended activity diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/ApkPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/ApkPresenter.java index 5e69af2..ca27203 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/ApkPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/ApkPresenter.java @@ -17,10 +17,10 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.Presenter; -import android.support.v7.graphics.Palette; -import android.transition.Transition; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; +import androidx.palette.graphics.Palette; + import android.util.Log; import android.view.ViewGroup; diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/CardPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/CardPresenter.java index 215d7fa..dcebbd5 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/CardPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/CardPresenter.java @@ -1,8 +1,8 @@ package news.androidtv.tvapprepo.presenters; import android.content.Context; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.Presenter; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; import android.view.View; import android.view.ViewGroup; @@ -42,4 +42,4 @@ public ViewHolder(View view) { super(view); } } -} \ No newline at end of file +} diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/DetailsDescriptionPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/DetailsDescriptionPresenter.java index 7e94522..3fe3748 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/DetailsDescriptionPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/DetailsDescriptionPresenter.java @@ -15,9 +15,8 @@ package news.androidtv.tvapprepo.presenters; import android.content.Context; -import android.support.v17.leanback.widget.AbstractDetailsDescriptionPresenter; +import androidx.leanback.widget.AbstractDetailsDescriptionPresenter; import android.util.Log; -import android.widget.TextView; import com.google.firebase.database.DatabaseError; diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/DownloadedFilesPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/DownloadedFilesPresenter.java index 7a89ebe..e7793ae 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/DownloadedFilesPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/DownloadedFilesPresenter.java @@ -1,7 +1,7 @@ package news.androidtv.tvapprepo.presenters; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.Presenter; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; import android.view.ContextThemeWrapper; import android.view.ViewGroup; import android.widget.ImageView; @@ -9,7 +9,6 @@ import java.io.File; import news.androidtv.tvapprepo.R; -import news.androidtv.tvapprepo.model.SettingOption; /** * A presenter which can be used to show downloaded APKs with an optional title along the bottom. diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/LauncherActivitiesPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/LauncherActivitiesPresenter.java index d0c3701..5c37097 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/LauncherActivitiesPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/LauncherActivitiesPresenter.java @@ -1,18 +1,15 @@ package news.androidtv.tvapprepo.presenters; import android.content.pm.ResolveInfo; -import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.Presenter; -import android.support.v7.graphics.Palette; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; +import androidx.palette.graphics.Palette; import android.util.Log; import android.view.ContextThemeWrapper; import android.view.ViewGroup; import android.widget.ImageView; -import java.io.File; - import news.androidtv.tvapprepo.R; /** diff --git a/app/src/main/java/news/androidtv/tvapprepo/presenters/OptionsCardPresenter.java b/app/src/main/java/news/androidtv/tvapprepo/presenters/OptionsCardPresenter.java index 3fc1d51..59d20ec 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/presenters/OptionsCardPresenter.java +++ b/app/src/main/java/news/androidtv/tvapprepo/presenters/OptionsCardPresenter.java @@ -1,7 +1,7 @@ package news.androidtv.tvapprepo.presenters; -import android.support.v17.leanback.widget.ImageCardView; -import android.support.v17.leanback.widget.Presenter; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; import android.view.ContextThemeWrapper; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/app/src/main/java/news/androidtv/tvapprepo/ui/ShortcutGeneratorDialogs.java b/app/src/main/java/news/androidtv/tvapprepo/ui/ShortcutGeneratorDialogs.java index a27a348..b809085 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/ui/ShortcutGeneratorDialogs.java +++ b/app/src/main/java/news/androidtv/tvapprepo/ui/ShortcutGeneratorDialogs.java @@ -1,8 +1,8 @@ package news.androidtv.tvapprepo.ui; import android.app.Activity; -import android.content.Intent; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; import android.util.Log; import android.view.ContextThemeWrapper; import android.widget.EditText; diff --git a/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java b/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java index bd3ad4f..4952fb5 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java +++ b/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java @@ -6,8 +6,8 @@ import android.content.pm.ResolveInfo; import android.os.Handler; import android.os.Looper; -import android.support.annotation.VisibleForTesting; -import android.support.v7.app.AlertDialog; +import androidx.annotation.VisibleForTesting; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.ContextThemeWrapper; import android.widget.Toast; diff --git a/app/src/main/java/news/androidtv/tvapprepo/utils/PackageInstallerUtils.java b/app/src/main/java/news/androidtv/tvapprepo/utils/PackageInstallerUtils.java index 55cf6cd..b320e5d 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/utils/PackageInstallerUtils.java +++ b/app/src/main/java/news/androidtv/tvapprepo/utils/PackageInstallerUtils.java @@ -6,7 +6,7 @@ import android.content.pm.PackageInstaller; import android.content.pm.PackageManager; import android.net.Uri; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import news.androidtv.tvapprepo.model.Apk; diff --git a/app/src/main/java/tv/puppetmaster/tinydl/PackageInstaller.java b/app/src/main/java/tv/puppetmaster/tinydl/PackageInstaller.java index 0057dc0..ecf4244 100644 --- a/app/src/main/java/tv/puppetmaster/tinydl/PackageInstaller.java +++ b/app/src/main/java/tv/puppetmaster/tinydl/PackageInstaller.java @@ -13,10 +13,10 @@ import android.os.Build; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v4.content.FileProvider; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.core.content.FileProvider; import android.util.Log; import android.widget.Toast; @@ -363,4 +363,4 @@ public interface DownloadListener { */ void onProgressEnded(); } -} \ No newline at end of file +} diff --git a/gradle.properties b/gradle.properties index 55d18ea..4294d3b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,3 +16,5 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +android.enableJetifier=true +android.useAndroidX=true diff --git a/python/Shortcut/app/src/androidTest/java/shortcut/androidtv/news/shortcut/ExampleInstrumentedTest.java b/python/Shortcut/app/src/androidTest/java/shortcut/androidtv/news/shortcut/ExampleInstrumentedTest.java index 6e8efe0..0c63bdf 100644 --- a/python/Shortcut/app/src/androidTest/java/shortcut/androidtv/news/shortcut/ExampleInstrumentedTest.java +++ b/python/Shortcut/app/src/androidTest/java/shortcut/androidtv/news/shortcut/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package shortcut.androidtv.news.shortcut; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; From a64f1198a569497ce735ab5f4b4eb5539b834533 Mon Sep 17 00:00:00 2001 From: Grantland Chew Date: Wed, 29 Dec 2021 23:32:11 -0800 Subject: [PATCH 6/6] Re-enable Crashlytics --- app/build.gradle | 15 ++++++++++----- app/src/main/AndroidManifest.xml | 4 ++++ .../tvapprepo/utils/GenerateShortcutHelper.java | 5 +++++ app/src/main/res/values/admob.xml | 3 +-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2218e7f..751d065 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,19 +38,23 @@ android { buildscript { repositories { mavenCentral() + google() } dependencies { + classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' } } +apply plugin: 'com.google.firebase.crashlytics' repositories { mavenCentral() + google() } ext { supportLibrary = '25.3.1' - googlePlayServices = '11.2.0' } dependencies { @@ -61,15 +65,16 @@ dependencies { implementation "com.android.support:appcompat-v7:$project.ext.supportLibrary" implementation "com.android.support:palette-v7:$project.ext.supportLibrary" - implementation "com.google.firebase:firebase-database:$project.ext.googlePlayServices" - implementation "com.google.android.gms:play-services-ads:$project.ext.googlePlayServices" - implementation "com.google.firebase:firebase-config:$project.ext.googlePlayServices" - implementation "com.google.firebase:firebase-ads:$project.ext.googlePlayServices" + implementation "com.google.firebase:firebase-database:20.0.3" + implementation "com.google.android.gms:play-services-ads:19.7.0" + implementation "com.google.firebase:firebase-config:19.2.0" + implementation "com.google.firebase:firebase-ads:19.7.0" implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'com.afollestad.material-dialogs:core:0.9.0.2' implementation 'com.android.volley:volley:1.2.1' + implementation 'com.google.firebase:firebase-crashlytics:18.2.6' androidTestImplementation 'com.android.support:support-annotations:25.3.1' androidTestImplementation 'com.android.support.test:runner:0.5' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 45278f4..e4b7885 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -69,6 +69,10 @@ android:name="io.fabric.ApiKey" android:value="dfe843f8af6acfe924ff6efa0c816fda4ece9f5c" /> + + diff --git a/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java b/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java index 4952fb5..d336217 100644 --- a/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java +++ b/app/src/main/java/news/androidtv/tvapprepo/utils/GenerateShortcutHelper.java @@ -251,6 +251,11 @@ public void onRewardedVideoAdLeftApplication() { public void onRewardedVideoAdFailedToLoad(int i) { } + + @Override + public void onRewardedVideoCompleted() { + + } }); ad.loadAd(activity.getString(R.string.reward_video_ad_unit_id), new AdRequest.Builder().build()); } diff --git a/app/src/main/res/values/admob.xml b/app/src/main/res/values/admob.xml index a278018..3caa97e 100644 --- a/app/src/main/res/values/admob.xml +++ b/app/src/main/res/values/admob.xml @@ -1,6 +1,5 @@ - ca-app-pub-1944443832257008~2295844375 ca-app-pub-1944443832257008/3772577578 ca-app-pub-1944443832257008/4479621174 - \ No newline at end of file +