android: launcher: configure the screen to stay on forever
This commit is contained in:
parent
6011fe2982
commit
795728aae6
2 changed files with 10 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.anbox.launcher">
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
||||
|
||||
<application
|
||||
android:name=".LauncherApplication"
|
||||
android:label="Anbox Launcher"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package org.anbox.launcher;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
|
||||
/**
|
||||
* Default launcher application.
|
||||
|
|
@ -29,6 +30,13 @@ public final class Launcher extends Activity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Make sure the screen stays on forever
|
||||
Settings.System.putInt(
|
||||
getContentResolver(),
|
||||
Settings.System.SCREEN_OFF_TIMEOUT,
|
||||
Integer.MAX_VALUE);
|
||||
|
||||
setContentView(R.layout.activity_launcher);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue