mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 09:49:25 +02:00
Update target sdk
This commit is contained in:
parent
6a4b4505bb
commit
6e9641638f
3 changed files with 7 additions and 7 deletions
|
@ -25,11 +25,11 @@ plugins {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'io.timelimit.android'
|
namespace 'io.timelimit.android'
|
||||||
compileSdkVersion 34
|
compileSdk 35
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.timelimit.android"
|
applicationId "io.timelimit.android"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
versionCode 218
|
versionCode 218
|
||||||
versionName "7.1.0"
|
versionName "7.1.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* TimeLimit Copyright <C> 2019 - 2022 Jonas Lochmann
|
* TimeLimit Copyright <C> 2019 - 2024 Jonas Lochmann
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -184,7 +184,7 @@ class LollipopForegroundAppHelper(context: Context) : UsageStatsForegroundAppHel
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun doesActivityExistAsAlias(app: ForegroundApp) = try {
|
private fun doesActivityExistAsAlias(app: ForegroundApp) = try {
|
||||||
packageManager.getPackageInfo(app.packageName, PackageManager.GET_ACTIVITIES).activities.find {
|
packageManager.getPackageInfo(app.packageName, PackageManager.GET_ACTIVITIES).activities?.find {
|
||||||
it.enabled && it.targetActivity == app.activityName
|
it.enabled && it.targetActivity == app.activityName
|
||||||
} != null
|
} != null
|
||||||
} catch (ex: PackageManager.NameNotFoundException) {
|
} catch (ex: PackageManager.NameNotFoundException) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* TimeLimit Copyright <C> 2019 - 2020 Jonas Lochmann
|
* TimeLimit Copyright <C> 2019 - 2024 Jonas Lochmann
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -70,12 +70,12 @@ object UpdateIntegration {
|
||||||
val signatures = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
val signatures = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
// new signature
|
// new signature
|
||||||
|
|
||||||
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_SIGNING_CERTIFICATES).signingInfo.apkContentsSigners
|
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_SIGNING_CERTIFICATES).signingInfo!!.apkContentsSigners
|
||||||
} else {
|
} else {
|
||||||
// old signature
|
// old signature
|
||||||
// this is "unsafe", but it is not used for security features
|
// this is "unsafe", but it is not used for security features
|
||||||
|
|
||||||
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_SIGNATURES).signatures
|
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_SIGNATURES).signatures!!
|
||||||
}
|
}
|
||||||
|
|
||||||
return signatures.map { HexString.toHex(MessageDigest.getInstance("SHA-256").digest(it.toByteArray())) }
|
return signatures.map { HexString.toHex(MessageDigest.getInstance("SHA-256").digest(it.toByteArray())) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue