Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Fix missing foreground permission
Browse files Browse the repository at this point in the history
Signed-off-by: Fung Gwo <fython@163.com>
  • Loading branch information
fython committed Feb 16, 2019
1 parent 56f349e commit ca43e32
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 64 deletions.
127 changes: 64 additions & 63 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="info.papdt.blackblub">
xmlns:tools="http://schemas.android.com/tools"
package="info.papdt.blackblub">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE"/>

<permission
android:name="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN"
android:label="@string/permission_control_blackbulb_label"
android:description="@string/permission_control_blackbulb_desc"
android:protectionLevel="normal"/>

<application
android:allowBackup="true"
android:fullBackupContent="@xml/full_backup_contents"
android:name=".BlackbulbApplication"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_circle"
android:label="@string/app_name"
android:persistent="true"
android:supportsRtl="false"
android:theme="@style/AppTheme.Light"
tools:ignore="GoogleAppIndexingWarning">
<application
android:allowBackup="true"
android:fullBackupContent="@xml/full_backup_contents"
android:name=".BlackbulbApplication"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_circle"
android:label="@string/app_name"
android:persistent="true"
android:supportsRtl="false"
android:theme="@style/AppTheme.Light"
tools:ignore="GoogleAppIndexingWarning">

<activity
android:name=".ui.MainActivity"
android:finishOnTaskLaunch="true"
android:excludeFromRecents="false"
android:launchMode="singleInstance"
android:stateNotNeeded="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
<activity
android:name=".ui.MainActivity"
android:finishOnTaskLaunch="true"
android:excludeFromRecents="false"
android:launchMode="singleInstance"
android:stateNotNeeded="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts"/>
</activity>
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts"/>
</activity>

<activity
android:name=".ui.MoreSettingsActivity"
Expand All @@ -53,49 +54,49 @@
android:theme="@android:style/Theme.Material.Light"
android:exported="false"/>

<activity android:name=".ui.shortcut.ToggleActivity"
android:label="@string/shortcut_label_switch"
android:icon="@mipmap/ic_shortcut_switch"
android:launchMode="singleInstance"
android:finishOnTaskLaunch="true"
android:excludeFromRecents="true"
android:theme="@style/AppTheme.Empty">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
</intent-filter>
</activity>
<activity android:name=".ui.shortcut.ToggleActivity"
android:label="@string/shortcut_label_switch"
android:icon="@mipmap/ic_shortcut_switch"
android:launchMode="singleInstance"
android:finishOnTaskLaunch="true"
android:excludeFromRecents="true"
android:theme="@style/AppTheme.Empty">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
</intent-filter>
</activity>

<service
<service
android:name=".service.MaskService"
android:process=":mask"
android:permission="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN">
<intent-filter>
<action android:name="info.papdt.blackblub.IMaskServiceInterface"/>
</intent-filter>
</service>
<intent-filter>
<action android:name="info.papdt.blackblub.IMaskServiceInterface"/>
</intent-filter>
</service>

<service
android:name=".service.MaskTileService"
android:icon="@drawable/ic_brightness_2_white_36dp"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
</intent-filter>
</service>
<service
android:name=".service.MaskTileService"
android:icon="@drawable/ic_brightness_2_white_36dp"
android:label="@string/app_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>

<receiver
<receiver
android:name=".receiver.ActionReceiver"
android:exported="true"
android:permission="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN">
<intent-filter>
<action android:name="info.papdt.blackbulb.ACTION_UPDATE_STATUS" />
<action android:name="info.papdt.blackbulb.ALARM_ACTION_START" />
<action android:name="info.papdt.blackbulb.ALARM_ACTION_STOP" />
</intent-filter>
</receiver>
<intent-filter>
<action android:name="info.papdt.blackbulb.ACTION_UPDATE_STATUS"/>
<action android:name="info.papdt.blackbulb.ALARM_ACTION_START"/>
<action android:name="info.papdt.blackbulb.ALARM_ACTION_STOP"/>
</intent-filter>
</receiver>

</application>
</application>

</manifest>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.3.1'
}
}

Expand Down

0 comments on commit ca43e32

Please sign in to comment.