mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 23:55:21 +01:00
Make target and compile sdk version 35 again
This commit is contained in:
parent
24e9d6c5bf
commit
5a206e101f
3 changed files with 14 additions and 13 deletions
|
@ -5,12 +5,12 @@ apply plugin: 'kotlin-parcelize'
|
||||||
apply plugin: 'com.google.devtools.ksp'
|
apply plugin: 'com.google.devtools.ksp'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 34
|
compileSdk 35
|
||||||
namespace "code.name.monkey.retromusic"
|
namespace "code.name.monkey.retromusic"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 35
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
|
|
|
@ -167,14 +167,14 @@ class PackageValidator(
|
||||||
private fun buildCallerInfo(callingPackage: String): CallerPackageInfo? {
|
private fun buildCallerInfo(callingPackage: String): CallerPackageInfo? {
|
||||||
val packageInfo = getPackageInfo(callingPackage) ?: return null
|
val packageInfo = getPackageInfo(callingPackage) ?: return null
|
||||||
|
|
||||||
val appName = packageInfo.applicationInfo.loadLabel(packageManager).toString()
|
val appName = packageInfo.applicationInfo?.loadLabel(packageManager)?.toString() ?: return null
|
||||||
val uid = packageInfo.applicationInfo.uid
|
val uid = packageInfo.applicationInfo?.uid ?: return null
|
||||||
val signature = getSignature(packageInfo)
|
val signature = getSignature(packageInfo)
|
||||||
|
|
||||||
val requestedPermissions = packageInfo.requestedPermissions
|
val requestedPermissions = packageInfo.requestedPermissions ?: emptyArray()
|
||||||
val permissionFlags = packageInfo.requestedPermissionsFlags
|
val permissionFlags = packageInfo.requestedPermissionsFlags ?: IntArray(requestedPermissions.size)
|
||||||
val activePermissions = mutableSetOf<String>()
|
val activePermissions = mutableSetOf<String>()
|
||||||
requestedPermissions?.forEachIndexed { index, permission ->
|
requestedPermissions.forEachIndexed { index, permission ->
|
||||||
if (permissionFlags[index] and REQUESTED_PERMISSION_GRANTED != 0) {
|
if (permissionFlags[index] and REQUESTED_PERMISSION_GRANTED != 0) {
|
||||||
activePermissions += permission
|
activePermissions += permission
|
||||||
}
|
}
|
||||||
|
@ -207,12 +207,13 @@ class PackageValidator(
|
||||||
*/
|
*/
|
||||||
@Suppress("deprecation")
|
@Suppress("deprecation")
|
||||||
private fun getSignature(packageInfo: PackageInfo): String? {
|
private fun getSignature(packageInfo: PackageInfo): String? {
|
||||||
// Security best practices dictate that an app should be signed with exactly one (1)
|
val signatures = packageInfo.signatures
|
||||||
// signature. Because of this, if there are multiple signatures, reject it.
|
return if (signatures == null || signatures.size != 1) {
|
||||||
return if (packageInfo.signatures == null || packageInfo.signatures.size != 1) {
|
// Security best practices dictate that an app should be signed with exactly one (1)
|
||||||
|
// signature. Because of this, if there are multiple signatures, reject it.
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
val certificate = packageInfo.signatures[0].toByteArray()
|
val certificate = signatures[0].toByteArray()
|
||||||
getSignatureSha256(certificate)
|
getSignatureSha256(certificate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
android {
|
android {
|
||||||
compileSdk 34
|
compileSdk 35
|
||||||
namespace "code.name.monkey.appthemehelper"
|
namespace "code.name.monkey.appthemehelper"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 35
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue