update dependencies
This commit is contained in:
parent
870dc6186d
commit
b7df223b9c
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.0" />
|
||||
<option name="version" value="1.9.20" />
|
||||
</component>
|
||||
</project>
|
|
@ -164,7 +164,7 @@ dependencies {
|
|||
implementation(project(":anko"))
|
||||
implementation(fileTree(mapOf("dir" to "src/main/libs", "include" to arrayOf("*.aar"))))
|
||||
|
||||
"fcmImplementation"("com.google.firebase:firebase-messaging:23.2.1")
|
||||
"fcmImplementation"("com.google.firebase:firebase-messaging:23.3.1")
|
||||
"fcmImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:${Vers.kotlinxCoroutinesVersion}")
|
||||
|
||||
// implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
|
||||
|
|
|
@ -103,7 +103,12 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||
intent.putExtra(EXTRA_DATA, encodeMediaList(list))
|
||||
intent.putExtra(EXTRA_SHOW_DESCRIPTION, showDescription)
|
||||
activity.startActivity(intent)
|
||||
activity.overridePendingTransition(R.anim.slide_from_bottom, android.R.anim.fade_out)
|
||||
|
||||
activity.overrideActivityTransitionCompat(
|
||||
TransitionOverrideType.Open,
|
||||
R.anim.slide_from_bottom,
|
||||
android.R.anim.fade_out,
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkMaxBitmapSize(): Int {
|
||||
|
@ -114,7 +119,6 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||
val px = 1.shl(bitsMid)
|
||||
val canCreate = try {
|
||||
val bitmap = Bitmap.createBitmap(px, px, Bitmap.Config.ARGB_8888)
|
||||
?: error("createBitmap returns null")
|
||||
bitmap.recycle()
|
||||
log.i("checkMaxBitmapSize: range=$bitsMin..$bitsMid..$bitsMax, px=${px}, canCreate=true")
|
||||
true
|
||||
|
@ -303,8 +307,8 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||
this.showDescription = intent.getBooleanExtra(EXTRA_SHOW_DESCRIPTION, showDescription)
|
||||
|
||||
this.serviceType = ServiceType.values()[
|
||||
savedInstanceState?.int(EXTRA_SERVICE_TYPE)
|
||||
?: intent.int(EXTRA_SERVICE_TYPE) ?: 0
|
||||
savedInstanceState?.int(EXTRA_SERVICE_TYPE)
|
||||
?: intent.int(EXTRA_SERVICE_TYPE) ?: 0
|
||||
]
|
||||
|
||||
this.mediaList = decodeMediaList(
|
||||
|
@ -338,7 +342,11 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||
|
||||
override fun finish() {
|
||||
super.finish()
|
||||
overridePendingTransition(R.anim.fade_in, R.anim.slide_to_bottom)
|
||||
overrideActivityTransitionCompat(
|
||||
TransitionOverrideType.Close,
|
||||
R.anim.fade_in,
|
||||
R.anim.slide_to_bottom,
|
||||
)
|
||||
}
|
||||
|
||||
internal fun initUI() {
|
||||
|
@ -593,7 +601,6 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||
// 回転後の画像
|
||||
val bitmap2 = try {
|
||||
Bitmap.createBitmap(dstSizeInt.x, dstSizeInt.y, Bitmap.Config.ARGB_8888)
|
||||
?: return Pair(bitmap1, "createBitmap returns null")
|
||||
} catch (ex: Throwable) {
|
||||
log.e(ex, "createBitmap failed.")
|
||||
return Pair(bitmap1, ex.withCaption("createBitmap failed."))
|
||||
|
|
|
@ -62,7 +62,13 @@ class CheckerWakeLocks(contextArg: Context) {
|
|||
).apply { setReferenceCounted(false) }
|
||||
}
|
||||
private val wifiLock: WifiManager.WifiLock by lazy {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
if (Build.VERSION.SDK_INT >= 34) {
|
||||
wifiManager.createWifiLock(
|
||||
WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
|
||||
PollingChecker::class.java.name
|
||||
)
|
||||
} else if (Build.VERSION.SDK_INT >= 29) {
|
||||
@Suppress("DEPRECATION")
|
||||
wifiManager.createWifiLock(
|
||||
WifiManager.WIFI_MODE_FULL_HIGH_PERF,
|
||||
PollingChecker::class.java.name
|
||||
|
|
|
@ -171,7 +171,7 @@ class SvgEmojiSpan internal constructor(
|
|||
|
||||
else -> try {
|
||||
Bitmap.createBitmap(dstSizeInt, dstSizeInt, Bitmap.Config.ARGB_8888)
|
||||
?.also { renderBitmap(it, svg, dstSize) }
|
||||
.also { renderBitmap(it, svg, dstSize) }
|
||||
} catch (ex: Throwable) {
|
||||
log.e(ex, "bitmap allocation failed.")
|
||||
null
|
||||
|
|
|
@ -113,9 +113,8 @@ class PermissionRequester(
|
|||
* 権限要求の結果を処理する
|
||||
* @param result 「パーミッション名」と「それが許可されているなら真」のマップ
|
||||
*/
|
||||
override fun onActivityResult(result: Map<String, Boolean>?) {
|
||||
override fun onActivityResult(result: Map<String, Boolean>) {
|
||||
try {
|
||||
result ?: error("missing result.")
|
||||
val listNotGranted = result.entries.filter { !it.value }.map { it.key }
|
||||
if (listNotGranted.isEmpty()) {
|
||||
// すべて許可されている
|
||||
|
|
|
@ -218,7 +218,7 @@ class BlurhashView : AppCompatTextView {
|
|||
val viewH = height
|
||||
|
||||
val b = blurhashBitmap
|
||||
if (b != null && !b.isRecycled && blurhashDecodeOk) {
|
||||
if (!b.isRecycled && blurhashDecodeOk) {
|
||||
rectSrc.set(0, 0, b.width, b.height)
|
||||
rectDst.set(0, 0, viewW, viewH)
|
||||
canvas.drawBitmap(b, rectSrc, rectDst, paint)
|
||||
|
|
|
@ -70,7 +70,7 @@ dependencies {
|
|||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:${Vers.desugarLibVersion}")
|
||||
|
||||
api("androidx.appcompat:appcompat:${Vers.appcompatVersion}")
|
||||
api("androidx.browser:browser:1.6.0")
|
||||
api("androidx.browser:browser:1.7.0")
|
||||
api("androidx.core:core-ktx:${Vers.coreKtxVersion}")
|
||||
api("androidx.drawerlayout:drawerlayout:1.2.0")
|
||||
api("androidx.emoji2:emoji2-bundled:${Vers.emoji2Version}")
|
||||
|
@ -86,7 +86,7 @@ dependencies {
|
|||
api("androidx.lifecycle:lifecycle-service:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-viewmodel-ktx:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-viewmodel-savedstate:${Vers.lifecycleVersion}")
|
||||
api("androidx.recyclerview:recyclerview:1.3.1")
|
||||
api("androidx.recyclerview:recyclerview:1.3.2")
|
||||
api("androidx.startup:startup-runtime:${Vers.startupVersion}")
|
||||
api("androidx.work:work-runtime-ktx:${Vers.workVersion}")
|
||||
api("androidx.work:work-runtime:${Vers.workVersion}")
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.net.Uri
|
|||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.annotation.AnimRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
|
@ -109,7 +110,6 @@ fun PackageManager.getPackageInfoCompat(
|
|||
): PackageInfo? = if (Build.VERSION.SDK_INT >= 33) {
|
||||
getPackageInfo(pakageName, PackageInfoFlags.of(flags.toLong()))
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
getPackageInfo(pakageName, flags)
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,6 @@ fun PackageManager.queryIntentActivitiesCompat(
|
|||
): List<ResolveInfo> = if (Build.VERSION.SDK_INT >= 33) {
|
||||
queryIntentActivities(intent, ResolveInfoFlags.of(queryFlag.toLong()))
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
queryIntentActivities(intent, queryFlag)
|
||||
}
|
||||
|
||||
|
@ -130,7 +129,6 @@ fun PackageManager.resolveActivityCompat(
|
|||
): ResolveInfo? = if (Build.VERSION.SDK_INT >= 33) {
|
||||
resolveActivity(intent, ResolveInfoFlags.of(queryFlag.toLong()))
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
resolveActivity(intent, queryFlag)
|
||||
}
|
||||
|
||||
|
@ -144,6 +142,37 @@ fun AppCompatActivity.backPressed(block: () -> Unit) {
|
|||
inline fun <reified T> systemService(context: Context): T? =
|
||||
/* ContextCompat. */ ContextCompat.getSystemService(context, T::class.java)
|
||||
|
||||
enum class TransitionOverrideType { Open, Close, }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param overrideType one of OVERRIDE_TRANSITION_OPEN, OVERRIDE_TRANSITION_CLOSE .
|
||||
*/
|
||||
fun AppCompatActivity.overrideActivityTransitionCompat(
|
||||
overrideType: TransitionOverrideType,
|
||||
@AnimRes animEnter: Int,
|
||||
@AnimRes animExit: Int,
|
||||
) {
|
||||
if (Build.VERSION.SDK_INT >= 34) {
|
||||
overrideActivityTransition(
|
||||
when (overrideType) {
|
||||
TransitionOverrideType.Open ->
|
||||
AppCompatActivity.OVERRIDE_TRANSITION_OPEN
|
||||
|
||||
TransitionOverrideType.Close ->
|
||||
AppCompatActivity.OVERRIDE_TRANSITION_CLOSE
|
||||
},
|
||||
animEnter,
|
||||
animExit
|
||||
)
|
||||
} else {
|
||||
overridePendingTransition(
|
||||
animEnter,
|
||||
animExit,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//object Utils {
|
||||
//
|
||||
|
|
|
@ -8,7 +8,7 @@ buildscript {
|
|||
classpath("com.android.tools.build:gradle:${Vers.androidGradlePruginVersion}")
|
||||
|
||||
// room のバージョンの影響で google-services を上げられない場合がある
|
||||
classpath("com.google.gms:google-services:4.3.15")
|
||||
classpath("com.google.gms:google-services:4.4.0")
|
||||
|
||||
//noinspection DifferentKotlinGradleVersion
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Vers.kotlinVersion}")
|
||||
|
|
|
@ -4,7 +4,7 @@ object Vers {
|
|||
val javaSourceCompatibility = JavaVersion.VERSION_1_8
|
||||
val javaTargetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
const val androidGradlePruginVersion = "8.1.1"
|
||||
const val androidGradlePruginVersion = "8.1.4"
|
||||
const val androidxAnnotationVersion = "1.6.0"
|
||||
const val androidxTestEspressoCoreVersion = "3.5.1"
|
||||
const val androidxTestExtJunitVersion = "1.1.5"
|
||||
|
@ -21,16 +21,16 @@ object Vers {
|
|||
const val emoji2Version = "1.4.0"
|
||||
const val glideVersion = "4.15.1"
|
||||
const val junitVersion = "4.13.2"
|
||||
const val koinVersion = "3.4.2"
|
||||
const val koinVersion = "3.5.0"
|
||||
const val kotlinJvmTarget = "1.8"
|
||||
const val kotlinJvmToolchain = 17
|
||||
const val kotlinTestVersion = "1.9.0"
|
||||
const val kotlinVersion = "1.9.0"
|
||||
const val kotlinxCoroutinesVersion = "1.7.2"
|
||||
const val kspVersion = "1.9.0-1.0.11"
|
||||
const val lifecycleVersion = "2.6.1"
|
||||
const val materialVersion = "1.9.0"
|
||||
const val media3Version = "1.1.1"
|
||||
const val kotlinVersion = "1.9.20"
|
||||
const val kotlinxCoroutinesVersion = "1.7.3"
|
||||
const val kspVersion = "1.9.20-1.0.14"
|
||||
const val lifecycleVersion = "2.6.2"
|
||||
const val materialVersion = "1.10.0"
|
||||
const val media3Version = "1.2.0"
|
||||
const val okhttpVersion = "5.0.0-alpha.11"
|
||||
const val preferenceKtxVersion = "1.2.1"
|
||||
const val stBuildToolsVersion = "34.0.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Mon Jun 13 20:53:58 JST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
Loading…
Reference in New Issue