mirror of
http://galexander.org/git/simplesshd.git
synced 2025-01-01 02:40:52 +00:00
TV-LM: add launcher target for android TV (leanback)
This commit is contained in:
parent
d5ad84d781
commit
8952d008f2
@ -24,7 +24,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.galexander.sshd"
|
||||
minSdkVersion 16
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 28
|
||||
}
|
||||
|
||||
@ -38,4 +38,5 @@ android {
|
||||
}
|
||||
dependencies {
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.leanback:leanback:1.0.0'
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
<application android:label="SimpleSSHD" android:icon="@drawable/icon"
|
||||
android:allowBackup="false" android:banner="@drawable/tvbanner">
|
||||
<activity android:name="SimpleSSHD" android:label="SimpleSSHD"
|
||||
@ -17,6 +19,14 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="SimpleSSHDTV" android:label="SimpleSSHD"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/Theme.Leanback">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="Settings" android:label="Settings" />
|
||||
<service android:name="SimpleSSHDService"
|
||||
android:label="SimpleSSHDService" />
|
||||
|
@ -317,4 +317,8 @@ public class SimpleSSHD extends Activity
|
||||
public void onRequestPermissionsResult(int code, String[] perms, int[] results) {
|
||||
Prefs.set_requested(); /* whatever result, don't ask again */
|
||||
}
|
||||
|
||||
public static boolean is_tv() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
8
app/src/main/java/org/galexander/sshd/SimpleSSHDTV.java
Normal file
8
app/src/main/java/org/galexander/sshd/SimpleSSHDTV.java
Normal file
@ -0,0 +1,8 @@
|
||||
package org.galexander.sshd;
|
||||
|
||||
public class SimpleSSHDTV extends SimpleSSHD
|
||||
{
|
||||
public static boolean is_tv() {
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user