diff --git a/app/build.gradle b/app/build.gradle index bbb010f6..9541f365 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,14 +6,14 @@ plugins { android { - compileSdk 34 + compileSdk 33 defaultConfig { applicationId "com.draco.ladb" minSdk 26 - targetSdk 34 - versionCode 46 - versionName "2.4.2" + targetSdk 33 + versionCode 47 + versionName "2.4.3" ndk { abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64' @@ -55,18 +55,18 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1-Beta' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' - implementation 'androidx.core:core-ktx:1.13.1' - implementation 'androidx.appcompat:appcompat:1.7.0' - implementation 'androidx.preference:preference-ktx:1.2.1' - implementation 'androidx.fragment:fragment-ktx:1.8.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.2' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.2' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.preference:preference-ktx:1.2.0' + implementation 'androidx.fragment:fragment-ktx:1.6.0' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' + implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' implementation 'com.github.javiersantos:PiracyChecker:1.2.8' - implementation 'com.google.android.material:material:1.12.0' - implementation 'com.google.android.gms:play-services-oss-licenses:17.1.0' + implementation 'com.google.android.material:material:1.9.0' + implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b38add6c..0cad275e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,19 +1,19 @@ + xmlns:tools="http://schemas.android.com/tools" + android:installLocation="internalOnly"> + android:required="false" /> + android:required="false" /> - + + tools:ignore="ProtectedPermissions" /> - + - - + + + android:label="@string/more" /> + android:label="@string/bookmarks" /> - + @@ -58,7 +58,7 @@ android:grantUriPermissions="true"> + android:resource="@xml/provider_paths" /> diff --git a/app/src/main/java/com/draco/ladb/services/QSTile.kt b/app/src/main/java/com/draco/ladb/services/QSTile.kt index 0ea14ede..4c687471 100644 --- a/app/src/main/java/com/draco/ladb/services/QSTile.kt +++ b/app/src/main/java/com/draco/ladb/services/QSTile.kt @@ -1,8 +1,6 @@ package com.draco.ladb.services -import android.app.PendingIntent import android.content.Intent -import android.os.Build import android.service.quicksettings.TileService import com.draco.ladb.views.MainActivity @@ -11,18 +9,6 @@ class QSTile : TileService() { super.onClick() val intent = Intent(applicationContext, MainActivity::class.java) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - val pendingIntent = PendingIntent.getActivity( - applicationContext, - 0, - intent, - PendingIntent.FLAG_IMMUTABLE - ) - startActivityAndCollapse(pendingIntent) - } else { - startActivityAndCollapse(intent) - } - + startActivityAndCollapse(intent) } } \ No newline at end of file diff --git a/app/src/main/java/com/draco/ladb/utils/ADB.kt b/app/src/main/java/com/draco/ladb/utils/ADB.kt index 8a9b0850..b5f6529f 100644 --- a/app/src/main/java/com/draco/ladb/utils/ADB.kt +++ b/app/src/main/java/com/draco/ladb/utils/ADB.kt @@ -31,6 +31,7 @@ class ADB(private val context: Context) { private val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context) private val adbPath = "${context.applicationInfo.nativeLibraryDir}/libadb.so" + private val scriptPath = "${context.getExternalFilesDir(null)}/script.sh" /** * Is the shell ready to handle commands? @@ -126,15 +127,9 @@ class ADB(private val context: Context) { } adb(false, listOf("start-server")).waitFor() - - debug("Attempting to connect to localhost...") - debug("This may take a minute") - adb(false, listOf("connect", "localhost")).waitFor(1, TimeUnit.MINUTES) - debug("Waiting for device to connect...") debug("This may take a minute") val waitProcess = adb(false, listOf("wait-for-device")).waitFor(1, TimeUnit.MINUTES) - if (!waitProcess) { debug("Your device didn't connect to LADB") debug("If a reboot doesn't work, please contact support") diff --git a/app/src/main/java/com/draco/ladb/viewmodels/MainActivityViewModel.kt b/app/src/main/java/com/draco/ladb/viewmodels/MainActivityViewModel.kt index 11f591e2..ad4dc0dc 100644 --- a/app/src/main/java/com/draco/ladb/viewmodels/MainActivityViewModel.kt +++ b/app/src/main/java/com/draco/ladb/viewmodels/MainActivityViewModel.kt @@ -2,7 +2,10 @@ package com.draco.ladb.viewmodels import android.app.Activity import android.app.Application +import android.content.Intent +import android.net.Uri import android.os.Build +import android.os.Parcelable import androidx.core.content.edit import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.LiveData diff --git a/build.gradle b/build.gradle index 7209f4ee..a76c5391 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "2.0.0" + ext.kotlin_version = "1.8.20" repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.2.2' + classpath 'com.android.tools.build:gradle:7.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6' diff --git a/gradle.properties b/gradle.properties index 48ac76d3..5fae978e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,6 +19,3 @@ android.useAndroidX=true kotlin.code.style=official DEBUG_ANTIPIRACY=false RELEASE_ANTIPIRACY=true -android.defaults.buildfeatures.buildconfig=true -android.nonTransitiveRClass=false -android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be3f26b2..6264c143 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Jun 03 20:49:13 PDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME