Skip to content

Commit 9d38c9b

Browse files
committed
TV support + updates
Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
1 parent 4cdb904 commit 9d38c9b

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
applicationId "com.draco.ssh"
1212
minSdkVersion 21
1313
targetSdkVersion 31
14-
versionCode 9
15-
versionName "1.1"
14+
versionCode 10
15+
versionName "1.2"
1616
}
1717

1818
buildTypes {
@@ -34,13 +34,13 @@ android {
3434
dependencies {
3535
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3636
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1-native-mt'
37-
implementation 'androidx.core:core-ktx:1.6.0'
37+
implementation 'androidx.core:core-ktx:1.7.0'
3838
implementation 'androidx.appcompat:appcompat:1.3.1'
3939
implementation "androidx.security:security-crypto:1.1.0-alpha03"
40-
implementation 'androidx.activity:activity-ktx:1.3.1'
41-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
42-
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
43-
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
40+
implementation 'androidx.activity:activity-ktx:1.4.0'
41+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
42+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
43+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
4444
implementation 'com.google.android.material:material:1.4.0'
4545
implementation 'com.jcraft:jsch:0.1.55'
4646
}

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.draco.ssh">
44

5+
<uses-feature android:name="android.software.leanback" android:required="false" />
6+
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
7+
58
<uses-permission android:name="android.permission.INTERNET" />
69

710
<application
8-
android:allowBackup="true"
911
android:icon="@mipmap/ic_launcher"
1012
android:label="@string/app_name"
1113
android:roundIcon="@mipmap/ic_launcher_round"
1214
android:supportsRtl="true"
13-
android:theme="@style/Theme.SSH">
15+
android:theme="@style/Theme.SSH"
16+
android:banner="@drawable/banner">
1417
<activity android:name=".views.LoginActivity"
1518
android:exported="true">
1619
<intent-filter>
1720
<action android:name="android.intent.action.MAIN" />
1821
<category android:name="android.intent.category.LAUNCHER" />
22+
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
1923
</intent-filter>
2024
</activity>
2125
<activity android:name=".views.ShellActivity" />

app/src/main/java/com/draco/ssh/views/ShellActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ class ShellActivity : AppCompatActivity() {
121121
Snackbar.make(output, getString(R.string.snackbar_intent_failed), Snackbar.LENGTH_SHORT)
122122
.setAction(getString(R.string.dismiss)) {}
123123
.show()
124-
}
124+
}
125125
true
126126
}
127127
else -> super.onOptionsItemSelected(item)
128128
}
129129
}
130130

131-
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
131+
override fun onCreateOptionsMenu(menu: Menu): Boolean {
132132
menuInflater.inflate(R.menu.shell, menu)
133133
return super.onCreateOptionsMenu(menu)
134134
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.5.30"
3+
ext.kotlin_version = "1.5.31"
44
repositories {
55
google()
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.0-alpha12'
9+
classpath 'com.android.tools.build:gradle:7.2.0-alpha04'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Dec 14 06:48:11 PST 2020
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-rc-1-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)