diff --git a/app/build.gradle b/app/build.gradle index b7e8ef2..f279ca9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,12 +5,12 @@ plugins { android { namespace 'com.kojiishi.simswitch' - compileSdk 33 + compileSdk 36 defaultConfig { applicationId "com.kojiishi.simswitch" minSdk 31 - targetSdk 33 + targetSdk 36 versionCode 1 versionName '0.1' @@ -37,7 +37,7 @@ android { compose true } composeOptions { - kotlinCompilerExtensionVersion '1.3.2' + kotlinCompilerExtensionVersion '1.5.10' } packagingOptions { resources { diff --git a/app/src/main/java/com/kojiishi/simswitch/Subscription.kt b/app/src/main/java/com/kojiishi/simswitch/Subscription.kt index e0a38c4..cdf04a5 100644 --- a/app/src/main/java/com/kojiishi/simswitch/Subscription.kt +++ b/app/src/main/java/com/kojiishi/simswitch/Subscription.kt @@ -2,6 +2,7 @@ package com.kojiishi.simswitch import android.Manifest import android.content.Context +import android.app.PendingIntent import android.content.Intent import android.content.pm.PackageManager import android.icu.text.ListFormatter @@ -74,7 +75,7 @@ data class Subscription( } val mgr = context.getSystemService(SubscriptionManager::class.java) val subscriptionInfos = mgr.activeSubscriptionInfoList - val subscriptions = subscriptionInfos.map { Subscription(it, context) } + val subscriptions = subscriptionInfos?.map { Subscription(it, context) } ?: listOf() return subscriptions } @@ -105,7 +106,11 @@ data class Subscription( val intent = Intent(Settings.ACTION_MANAGE_ALL_SIM_PROFILES_SETTINGS).apply { flags = Intent.FLAG_ACTIVITY_NEW_TASK } - context.startActivityAndCollapse(intent) + val pendingIntent = PendingIntent.getActivity( + context, 0, intent, + PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT + ) + context.startActivityAndCollapse(pendingIntent) } } } diff --git a/build.gradle b/build.gradle index 4314313..14c4ea2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.0.2' apply false - id 'com.android.library' version '8.0.2' apply false - id 'org.jetbrains.kotlin.android' version '1.7.20' apply false + id 'com.android.application' version '8.4.0' apply false + id 'com.android.library' version '8.4.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.22' apply false } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e5b21b0..b024543 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Jun 18 01:05:32 JST 2023 +#Sat Mar 21 11:30:15 GMT 2026 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100644 new mode 100755