File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/src/main/java/tk/superl2/xwifi Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class MainActivity : Activity() {
59
59
}
60
60
wifi_ListView.setOnItemLongClickListener { _, _, position, _ ->
61
61
val builder = AlertDialog .Builder (this )
62
- builder.setMessage(if (Build .VERSION .SDK_INT >= 24 ) {
62
+ builder.setMessage(if (Build .VERSION .SDK_INT >= Build . VERSION_CODES . N ) {
63
63
Html .fromHtml(
64
64
" <b>SSID</b>: ${wifiEntries[position].title} <br>" +
65
65
(if (wifiEntries[position].getPassword(true ) != " " ) " <b>Password</b>: ${wifiEntries[position].getPassword(true )} <br>" else { " " }) +
@@ -125,7 +125,7 @@ class MainActivity : Activity() {
125
125
if (::wifiEntries.isInitialized) wifiEntries.clear()
126
126
wifiEntrySSIDs.clear()
127
127
try {
128
- wifiEntries = if (Build .VERSION .SDK_INT >= 26 ) readOreoFile() else readNonOreoFile()
128
+ wifiEntries = if (Build .VERSION .SDK_INT >= Build . VERSION_CODES . O ) readOreoFile() else readNonOreoFile()
129
129
wifiEntries.mapTo(wifiEntrySSIDs) { it.title }
130
130
Log .v(TAG , " Wifi entries loaded." )
131
131
} catch (e: WifiUnparseableException ) {
@@ -144,7 +144,7 @@ class MainActivity : Activity() {
144
144
runOnUiThread {
145
145
dialog.dismiss()
146
146
}
147
- if (Build .VERSION .SDK_INT >= 21 ) {
147
+ if (Build .VERSION .SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) {
148
148
finishAndRemoveTask()
149
149
} else {
150
150
finish()
You can’t perform that action at this time.
0 commit comments