Got this shiny manifest ready to be granted all ze permissions
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="exm.rand.lol">
<uses-permission android:name="com.google.android.things.permission.MODIFY_SCREEN_SETTINGS" />
<uses-permission android:name="com.google.android.things.permission.REBOOT"/>
<application>
<uses-library android:name="com.google.android.things" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.IOT_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
and yet when I boot up the raspberry pi it fails with this in the logcat
12-01 15:23:19.349 2960 2960 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{exm.rand.lol/exm.rand.lol.MainActivity}: java.lang.SecurityException: Calling process requires permission com.google.android.things.permission.MODIFY_SCREEN_SETTINGS
I searched high and low, stumbled upon multiple threads on StackOverflow
Android Things permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS not found
How to request permission on Android Things?
but to no avail. Rebooting doesn't do anything, reinstalling doesn't do anything, the only way I found atm to give permissions is to manually grant them through adb like dis
adb shell pm grant exm.rand.lol com.google.android.things.permission.REBOOT
Running latest Preiew 6 of Android Things.