Skip to content

Commit 0bf3e06

Browse files
author
Dmitry Kazantsev
committed
Basic support for Android TV. Startup without cert.
1 parent 028d21d commit 0bf3e06

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
2020
tools:node="remove" />
2121

22+
<uses-feature android:name="android.software.leanback"
23+
android:required="false" />
24+
<uses-feature android:name="android.hardware.touchscreen"
25+
android:required="false" />
26+
2227
<application
2328
android:name=".HttpToolkitApplication"
2429
android:allowBackup="true"
@@ -46,6 +51,7 @@
4651
<intent-filter>
4752
<action android:name="android.intent.action.MAIN" />
4853
<category android:name="android.intent.category.LAUNCHER" />
54+
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
4955
</intent-filter>
5056

5157
<intent-filter

app/src/main/java/tech/httptoolkit/android/MainActivity.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
361361
onActivityResult(START_VPN_REQUEST, RESULT_OK, null)
362362
}
363363
}
364+
.setNegativeButton("Continue without certificate") { _, _ ->
365+
onActivityResult(INSTALL_CERT_REQUEST, RESULT_OK, null)
366+
}
364367
.show()
365368
}
366369
} else if (vpnNotConfigured) {

0 commit comments

Comments
 (0)