diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 6239a20..c7505c0 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -13,16 +13,12 @@ android {
targetSdk = 34
versionCode = 23
versionName = "4.6"
-
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables {
- useSupportLibrary = true
- }
}
buildTypes {
release {
isMinifyEnabled = true
+ isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
@@ -54,21 +50,10 @@ android {
dependencies {
implementation("org.apache.commons:commons-io:1.3.2")
- implementation("androidx.core:core-ktx:1.12.0")
- implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("androidx.activity:activity-compose:1.8.2")
- implementation(platform("androidx.compose:compose-bom:2024.02.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("com.google.accompanist:accompanist-drawablepainter:0.35.0-alpha")
- debugImplementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3:1.2.0")
implementation("androidx.navigation:navigation-compose:2.7.7")
- testImplementation("junit:junit:4.13.2")
- androidTestImplementation("androidx.test.ext:junit:1.1.5")
- androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
- androidTestImplementation(platform("androidx.compose:compose-bom:2024.02.01"))
- androidTestImplementation("androidx.compose.ui:ui-test-junit4")
- debugImplementation("androidx.compose.ui:ui-tooling")
- debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.2")
}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 481bb43..3f41e6a 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -5,6 +5,7 @@
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
+-dontobfuscate
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
@@ -14,8 +15,8 @@
# Uncomment this to preserve the line number information for
# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
+-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
+-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/binbin/androidowner/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/binbin/androidowner/ExampleInstrumentedTest.kt
deleted file mode 100644
index 4cd0443..0000000
--- a/app/src/androidTest/java/com/binbin/androidowner/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.binbin.androidowner
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.binbin.androidowner", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/binbin/androidowner/MainActivity.kt b/app/src/main/java/com/binbin/androidowner/MainActivity.kt
index e775f55..67f34a3 100644
--- a/app/src/main/java/com/binbin/androidowner/MainActivity.kt
+++ b/app/src/main/java/com/binbin/androidowner/MainActivity.kt
@@ -10,6 +10,7 @@ import android.util.DisplayMetrics
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
+import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
@@ -62,6 +63,7 @@ class MainActivity : ComponentActivity() {
}
}
override fun onCreate(savedInstanceState: Bundle?) {
+ enableEdgeToEdge()
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
registerActivityResult()
diff --git a/app/src/main/java/com/binbin/androidowner/ui/theme/Theme.kt b/app/src/main/java/com/binbin/androidowner/ui/theme/Theme.kt
index 44f1a3c..17ed5ed 100644
--- a/app/src/main/java/com/binbin/androidowner/ui/theme/Theme.kt
+++ b/app/src/main/java/com/binbin/androidowner/ui/theme/Theme.kt
@@ -115,12 +115,10 @@ fun AndroidOwnerTheme(
else -> LightColorScheme
}
val view = LocalView.current
- if (!view.isInEditMode) {
- SideEffect {
- val window = (view.context as Activity).window
- window.statusBarColor = Color.Transparent.toArgb()
- WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
- }
+ SideEffect {
+ val window = (view.context as Activity).window
+ window.statusBarColor = Color.Transparent.toArgb()
+ WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
}
MaterialTheme(
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b37da39..32d076c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -150,7 +150,7 @@
清除数据
清除外部存储
清除受保护的数据
- 清除eUICC
+ 清除eUICC(eSIM)
静默清除
将会删除工作资料
API34或以上将不能在系统用户中使用WipeData
diff --git a/app/src/test/java/com/binbin/androidowner/ExampleUnitTest.kt b/app/src/test/java/com/binbin/androidowner/ExampleUnitTest.kt
deleted file mode 100644
index 5e548f6..0000000
--- a/app/src/test/java/com/binbin/androidowner/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.binbin.androidowner
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file