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'
|
||||
|
||||
android {
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
namespace "code.name.monkey.retromusic"
|
||||
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
targetSdk 35
|
||||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
|
|
|
@ -167,14 +167,14 @@ class PackageValidator(
|
|||
private fun buildCallerInfo(callingPackage: String): CallerPackageInfo? {
|
||||
val packageInfo = getPackageInfo(callingPackage) ?: return null
|
||||
|
||||
val appName = packageInfo.applicationInfo.loadLabel(packageManager).toString()
|
||||
val uid = packageInfo.applicationInfo.uid
|
||||
val appName = packageInfo.applicationInfo?.loadLabel(packageManager)?.toString() ?: return null
|
||||
val uid = packageInfo.applicationInfo?.uid ?: return null
|
||||
val signature = getSignature(packageInfo)
|
||||
|
||||
val requestedPermissions = packageInfo.requestedPermissions
|
||||
val permissionFlags = packageInfo.requestedPermissionsFlags
|
||||
val requestedPermissions = packageInfo.requestedPermissions ?: emptyArray()
|
||||
val permissionFlags = packageInfo.requestedPermissionsFlags ?: IntArray(requestedPermissions.size)
|
||||
val activePermissions = mutableSetOf<String>()
|
||||
requestedPermissions?.forEachIndexed { index, permission ->
|
||||
requestedPermissions.forEachIndexed { index, permission ->
|
||||
if (permissionFlags[index] and REQUESTED_PERMISSION_GRANTED != 0) {
|
||||
activePermissions += permission
|
||||
}
|
||||
|
@ -207,12 +207,13 @@ class PackageValidator(
|
|||
*/
|
||||
@Suppress("deprecation")
|
||||
private fun getSignature(packageInfo: PackageInfo): String? {
|
||||
val signatures = packageInfo.signatures
|
||||
return if (signatures == null || 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.
|
||||
return if (packageInfo.signatures == null || packageInfo.signatures.size != 1) {
|
||||
null
|
||||
} else {
|
||||
val certificate = packageInfo.signatures[0].toByteArray()
|
||||
val certificate = signatures[0].toByteArray()
|
||||
getSignatureSha256(certificate)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
android {
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
namespace "code.name.monkey.appthemehelper"
|
||||
|
||||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
targetSdk 35
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue