From 0bc8704c030df98c52f4d9eaa45be7133cbf6730 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:17:17 -0400 Subject: [PATCH 01/11] Remove other references to WifiConfig#getAuthType() --- .../java/tk/zwander/wifilist/ui/components/WiFiCard.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt b/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt index 394a5f2..914f5f9 100644 --- a/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt +++ b/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt @@ -36,6 +36,9 @@ fun WiFiCard( ) { val cbm = LocalClipboardManager.current val key = config.simpleKey ?: stringResource(id = R.string.no_password) + val securityParams = config.securityParamsObj + val insecure = securityParams?.type == ExportSecurityType.OPEN + val hasKey = config.simpleKey != null Card( modifier = modifier, @@ -49,8 +52,6 @@ fun WiFiCard( Row( verticalAlignment = Alignment.CenterVertically, ) { - val insecure = config.authType == WifiConfiguration.KeyMgmt.NONE - Icon( painter = painterResource(id = if (insecure) R.drawable.ic_unlocked else R.drawable.ic_locked), contentDescription = null, @@ -84,10 +85,10 @@ fun WiFiCard( TwoLineText( label = stringResource(id = R.string.password), value = key, - secure = config.authType != WifiConfiguration.KeyMgmt.NONE, + secure = hasKey, ) - if (config.authType != WifiConfiguration.KeyMgmt.NONE) { + if (hasKey) { IconButton( onClick = { cbm.setClip(ClipEntry(ClipData.newPlainText(config.SSID, key))) From 919f57e23b8375e967964e82783fe5afdcf5b42f Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:24:10 -0400 Subject: [PATCH 02/11] Update dependencies --- build.gradle.kts | 2 +- gradle/libs.versions.toml | 22 +++++++++++----------- gradle/wrapper/gradle-wrapper.properties | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 87b4d35..d2c7d76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,5 +13,5 @@ plugins { } tasks.register("clean") { - delete(rootProject.buildDir) + delete(rootProject.layout.buildDirectory) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 871b393..5adcace 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,21 +1,21 @@ [versions] -activityCompose = "1.8.2" -androidGradlePlugin = "8.2.2" +activityCompose = "1.9.0" +androidGradlePlugin = "8.3.2" shizuku = "13.1.5" bugsnagAndroid = "6.4.0" bugsnagGradlePlugin = "8.1.0" -compose = "1.7.0-alpha06" -composeCompiler = "1.5.11" -coreKtx = "1.12.0" -datastorePreferences = "1.1.0-rc01" +compose = "1.7.0-alpha07" +composeCompiler = "1.5.12" +compose-material3 = "1.3.0-alpha05" +coreKtx = "1.13.0" +datastorePreferences = "1.1.0" fastcsv = "3.1.0" -fragmentKtx = "1.6.2" +fragmentKtx = "1.8.0-alpha02" gson = "2.10.1" hiddenapibypass = "4.3" kotlin = "1.9.23" -lifecycleRuntimeKtx = "2.7.0" -material = "1.11.0" -material3 = "1.2.1" +lifecycleRuntimeKtx = "2.8.0-beta01" +material = "1.13.0-alpha01" patreonsupportersretrieval = "8436bbdbdc" relinker = "1.4.5" @@ -23,7 +23,7 @@ relinker = "1.4.5" activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } bugsnag-android = { module = "com.bugsnag:bugsnag-android", version.ref = "bugsnagAndroid" } compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "composeCompiler" } -compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } +compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a8eaa39..0fe73d0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Aug 07 13:47:43 EDT 2021 +#Sun Apr 21 17:23:04 EDT 2024 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists From a67704458c71e430c671985f9b77ea5a1428b810 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:26:34 -0400 Subject: [PATCH 03/11] Clean up Gradle scripts --- build.gradle.kts | 8 -------- settings.gradle.kts | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d2c7d76..91d0fde 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,3 @@ -buildscript { - repositories { - google() - mavenCentral() - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") - } -} - plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.bugsnag) apply false diff --git a/settings.gradle.kts b/settings.gradle.kts index 7d2b5ca..96790cf 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,5 @@ +@file:Suppress("UnstableApiUsage") + pluginManagement { repositories { gradlePluginPortal() @@ -11,7 +13,6 @@ dependencyResolutionManagement { google() mavenCentral() maven("https://jitpack.io") - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") } } rootProject.name = "WiFiList" From 980f5dcef81734c7d296e8f3ba886eec08d885a4 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:27:40 -0400 Subject: [PATCH 04/11] Java 17 --- app/build.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cd2a60b..ba58420 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,11 +25,11 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } buildFeatures { compose = true From 9611d94f9992826d8cc5e5735962821df5b34e43 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:33:55 -0400 Subject: [PATCH 05/11] Fix bottom bar appearance with navigation bar --- app/src/main/java/tk/zwander/wifilist/MainActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt index 8e0ff0c..e74b2df 100644 --- a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt +++ b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt @@ -249,6 +249,7 @@ class MainActivity : AppCompatActivity(), } } +@OptIn(ExperimentalLayoutApi::class) @Composable fun MainContent(networks: List) { var searchText by remember { @@ -274,11 +275,10 @@ fun MainContent(networks: List) { val exportLaunchers = rememberExportChoiceLaunchers(choices = exportChoices) WiFiListTheme { - // A surface container using the 'background' color from the theme Surface( modifier = Modifier.fillMaxSize() - .navigationBarsPadding() - .imePadding(), + .imePadding() + .imeNestedScroll(), color = MaterialTheme.colorScheme.background, ) { Scaffold( From 60ad522c9455f9ecb9ab38973750622b52e4d10f Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:38:48 -0400 Subject: [PATCH 06/11] Add extra content padding to grid and remove IME nested scrolling --- .../main/java/tk/zwander/wifilist/MainActivity.kt | 7 +++---- .../tk/zwander/wifilist/util/PaddingValues.kt | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt diff --git a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt index e74b2df..1bbca7b 100644 --- a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt +++ b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt @@ -57,6 +57,7 @@ import tk.zwander.wifilist.util.Preferences.cachedInfo import tk.zwander.wifilist.util.Preferences.updateCachedInfo import tk.zwander.wifilist.util.hasShizukuPermission import tk.zwander.wifilist.util.launchUrl +import tk.zwander.wifilist.util.plus class MainActivity : AppCompatActivity(), Shizuku.OnRequestPermissionResultListener, @@ -249,7 +250,6 @@ class MainActivity : AppCompatActivity(), } } -@OptIn(ExperimentalLayoutApi::class) @Composable fun MainContent(networks: List) { var searchText by remember { @@ -277,8 +277,7 @@ fun MainContent(networks: List) { WiFiListTheme { Surface( modifier = Modifier.fillMaxSize() - .imePadding() - .imeNestedScroll(), + .imePadding(), color = MaterialTheme.colorScheme.background, ) { Scaffold( @@ -334,7 +333,7 @@ fun MainContent(networks: List) { }, ) { padding -> LazyVerticalStaggeredGrid( - contentPadding = padding, + contentPadding = padding + PaddingValues(horizontal = 8.dp), columns = StaggeredGridCells.Adaptive(minSize = 400.dp), ) { items( diff --git a/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt b/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt new file mode 100644 index 0000000..8b4baf2 --- /dev/null +++ b/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt @@ -0,0 +1,15 @@ +package tk.zwander.wifilist.util + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding +import androidx.compose.ui.unit.LayoutDirection + +operator fun PaddingValues.plus(other: PaddingValues): PaddingValues = PaddingValues( + start = this.calculateStartPadding(LayoutDirection.Ltr) + + other.calculateStartPadding(LayoutDirection.Ltr), + top = this.calculateTopPadding() + other.calculateTopPadding(), + end = this.calculateEndPadding(LayoutDirection.Ltr) + + other.calculateEndPadding(LayoutDirection.Ltr), + bottom = this.calculateBottomPadding() + other.calculateBottomPadding(), +) From 8bcd19e3cd9404148e4794e993db8da9ee4e0542 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:49:20 -0400 Subject: [PATCH 07/11] Improve search bar animations and move IME padding to bottom bar --- .../java/tk/zwander/wifilist/MainActivity.kt | 22 ++++-- .../ui/components/ExpandableSearchField.kt | 67 ++++++++++--------- .../tk/zwander/wifilist/util/PaddingValues.kt | 1 + 3 files changed, 55 insertions(+), 35 deletions(-) diff --git a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt index 1bbca7b..ffca464 100644 --- a/app/src/main/java/tk/zwander/wifilist/MainActivity.kt +++ b/app/src/main/java/tk/zwander/wifilist/MainActivity.kt @@ -17,6 +17,10 @@ import androidx.activity.enableEdgeToEdge import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.expandIn +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.shrinkOut import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items @@ -276,16 +280,20 @@ fun MainContent(networks: List) { WiFiListTheme { Surface( - modifier = Modifier.fillMaxSize() - .imePadding(), + modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background, ) { Scaffold( bottomBar = { BottomAppBar( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier.fillMaxWidth() + .imePadding(), ) { - AnimatedVisibility(visible = !searchExpanded) { + AnimatedVisibility( + visible = !searchExpanded, + enter = fadeIn() + expandIn(expandFrom = Alignment.CenterStart), + exit = fadeOut() + shrinkOut(shrinkTowards = Alignment.CenterStart), + ) { Text( text = stringResource(id = R.string.saved_wifi_networks), modifier = Modifier.padding(start = 16.dp), @@ -311,7 +319,11 @@ fun MainContent(networks: List) { tint = MaterialTheme.colorScheme.onSurface, ) - AnimatedVisibility(visible = !searchExpanded) { + AnimatedVisibility( + visible = !searchExpanded, + enter = fadeIn() + expandIn(expandFrom = Alignment.CenterEnd), + exit = fadeOut() + shrinkOut(shrinkTowards = Alignment.CenterEnd), + ) { IconButton(onClick = { showingPopup = !showingPopup }) { Icon( imageVector = Icons.Default.Menu, diff --git a/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt b/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt index d7a682c..26fcc64 100644 --- a/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt +++ b/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt @@ -1,7 +1,10 @@ package tk.zwander.wifilist.ui.components -import androidx.compose.animation.Crossfade -import androidx.compose.animation.animateContentSize +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.expandIn +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.shrinkOut import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -31,39 +34,43 @@ fun ExpandableSearchView( expandedInitially: Boolean = false, tint: Color = MaterialTheme.colorScheme.onPrimary ) { - val (expanded, onExpandedChanged) = remember { + var expanded by remember { mutableStateOf(expandedInitially) } - Crossfade( - targetState = expanded, - modifier = Modifier.animateContentSize(), - label = "SearchIconCrossfade", - ) { isSearchFieldVisible -> - Box( - contentAlignment = Alignment.CenterStart, - modifier = modifier - .fillMaxHeight() + Box( + contentAlignment = Alignment.CenterStart, + modifier = modifier + .fillMaxHeight(), + ) { + AnimatedVisibility( + visible = expanded, + enter = fadeIn() + expandIn(expandFrom = Alignment.CenterEnd), + exit = fadeOut() + shrinkOut(shrinkTowards = Alignment.CenterEnd), ) { - when (isSearchFieldVisible) { - true -> ExpandedSearchView( - searchDisplay = searchDisplay, - onSearchDisplayChanged = onSearchDisplayChanged, - onSearchDisplayClosed = onSearchDisplayClosed, - onExpandedChanged = onExpandedChanged, - tint = tint - ) + ExpandedSearchView( + searchDisplay = searchDisplay, + onSearchDisplayChanged = onSearchDisplayChanged, + onSearchDisplayClosed = onSearchDisplayClosed, + onExpandedChanged = { expanded = it }, + tint = tint, + ) + } - false -> CollapsedSearchView( - onExpandedChanged = { - onExpandedChanged(it) - if (it) { - onSearchDisplayOpened() - } - }, - tint = tint - ) - } + AnimatedVisibility( + visible = !expanded, + enter = fadeIn(), + exit = fadeOut(), + ) { + CollapsedSearchView( + onExpandedChanged = { + expanded = it + if (it) { + onSearchDisplayOpened() + } + }, + tint = tint, + ) } } } diff --git a/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt b/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt index 8b4baf2..9a9a055 100644 --- a/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt +++ b/app/src/main/java/tk/zwander/wifilist/util/PaddingValues.kt @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.ui.unit.LayoutDirection +// https://stackoverflow.com/a/77030528/5496177 operator fun PaddingValues.plus(other: PaddingValues): PaddingValues = PaddingValues( start = this.calculateStartPadding(LayoutDirection.Ltr) + other.calculateStartPadding(LayoutDirection.Ltr), From 07f96f6702c3d5ee7af293cec898ff2ff9981b53 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 17:57:48 -0400 Subject: [PATCH 08/11] Use SpaceBetween for arranging WiFiCard items --- app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt b/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt index 914f5f9..51c08f6 100644 --- a/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt +++ b/app/src/main/java/tk/zwander/wifilist/ui/components/WiFiCard.kt @@ -71,7 +71,7 @@ fun WiFiCard( FlowRow( modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceAround, + horizontalArrangement = Arrangement.SpaceBetween, verticalArrangement = Arrangement.spacedBy(4.dp), ) { TwoLineText( From 25e0eae8f5084dda35452d71040a7deb71971095 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 18:09:11 -0400 Subject: [PATCH 09/11] Add clear button for search field --- .../ui/components/ExpandableSearchField.kt | 41 +++++++++++++++---- app/src/main/res/values/strings.xml | 1 + 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt b/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt index 26fcc64..53a069b 100644 --- a/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt +++ b/app/src/main/java/tk/zwander/wifilist/ui/components/ExpandableSearchField.kt @@ -1,6 +1,7 @@ package tk.zwander.wifilist.ui.components import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.animateColorAsState import androidx.compose.animation.expandIn import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut @@ -8,6 +9,8 @@ import androidx.compose.animation.shrinkOut import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Clear import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.ui.Alignment @@ -125,17 +128,20 @@ fun ExpandedSearchView( horizontalArrangement = Arrangement.Start, verticalAlignment = Alignment.CenterVertically ) { - IconButton(onClick = { - onExpandedChanged(false) - onSearchDisplayClosed() - keyboardController?.hide() - }) { + IconButton( + onClick = { + onExpandedChanged(false) + onSearchDisplayClosed() + keyboardController?.hide() + }, + ) { Icon( painter = painterResource(id = R.drawable.ic_back), contentDescription = stringResource(id = R.string.back), - tint = tint + tint = tint, ) } + TextField( value = searchDisplay, onValueChange = { @@ -154,7 +160,7 @@ fun ExpandedSearchView( keyboardActions = KeyboardActions( onDone = { focusManager.clearFocus() - } + }, ), colors = TextFieldDefaults.colors( focusedContainerColor = Color.Transparent, @@ -162,7 +168,26 @@ fun ExpandedSearchView( disabledContainerColor = Color.Transparent, errorContainerColor = Color.Transparent, ), - singleLine = true + singleLine = true, + trailingIcon = { + IconButton( + onClick = { + onSearchDisplayChanged("") + }, + enabled = searchDisplay.isNotEmpty(), + ) { + val iconColor by animateColorAsState( + targetValue = if (searchDisplay.isNotEmpty()) tint else tint.copy(alpha = LocalContentColor.current.alpha), + label = "SearchClearIconColor", + ) + + Icon( + imageVector = Icons.Default.Clear, + contentDescription = stringResource(id = R.string.clear), + tint = iconColor, + ) + } + }, ) } } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bf83f19..66bf6ab 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -30,6 +30,7 @@ PLMN Realm Cert Suite + Clear Menu Patreon From 4dd74348bb87825661ab03941257b90e09f105d9 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 18:09:24 -0400 Subject: [PATCH 10/11] Version 1.3.2 --- app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ba58420..9b06b00 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,8 +14,8 @@ android { applicationId = "tk.zwander.wifilist" minSdk = 30 targetSdk = 34 - versionCode = 12 - versionName = "1.3.1" + versionCode = 13 + versionName = "1.3.2" vectorDrawables { useSupportLibrary = true From d09a5771851c65096d5820e2474847a9ff599da8 Mon Sep 17 00:00:00 2001 From: Zachary Wander Date: Sun, 21 Apr 2024 18:10:24 -0400 Subject: [PATCH 11/11] Remove test files --- .../wifilist/ExampleInstrumentedTest.kt | 24 ------------------- .../tk/zwander/wifilist/ExampleUnitTest.kt | 17 ------------- 2 files changed, 41 deletions(-) delete mode 100644 app/src/androidTest/java/tk/zwander/wifilist/ExampleInstrumentedTest.kt delete mode 100644 app/src/test/java/tk/zwander/wifilist/ExampleUnitTest.kt diff --git a/app/src/androidTest/java/tk/zwander/wifilist/ExampleInstrumentedTest.kt b/app/src/androidTest/java/tk/zwander/wifilist/ExampleInstrumentedTest.kt deleted file mode 100644 index 733a011..0000000 --- a/app/src/androidTest/java/tk/zwander/wifilist/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package tk.zwander.wifilist - -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("tk.zwander.wifilist", appContext.packageName) - } -} \ No newline at end of file diff --git a/app/src/test/java/tk/zwander/wifilist/ExampleUnitTest.kt b/app/src/test/java/tk/zwander/wifilist/ExampleUnitTest.kt deleted file mode 100644 index 24a25f9..0000000 --- a/app/src/test/java/tk/zwander/wifilist/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package tk.zwander.wifilist - -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