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

Commit ca43e32

Browse files
committed
Fix missing foreground permission
Signed-off-by: Fung Gwo <fython@163.com>
1 parent 56f349e commit ca43e32

File tree

2 files changed

+65
-64
lines changed

2 files changed

+65
-64
lines changed

app/src/main/AndroidManifest.xml

+64-63
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="info.papdt.blackblub">
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="info.papdt.blackblub">
55

6-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
7-
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
8-
<uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE" />
6+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
7+
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
8+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
9+
<uses-permission android:name="cyanogenmod.permission.PUBLISH_CUSTOM_TILE"/>
910

1011
<permission
1112
android:name="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN"
1213
android:label="@string/permission_control_blackbulb_label"
1314
android:description="@string/permission_control_blackbulb_desc"
1415
android:protectionLevel="normal"/>
1516

16-
<application
17-
android:allowBackup="true"
18-
android:fullBackupContent="@xml/full_backup_contents"
19-
android:name=".BlackbulbApplication"
20-
android:icon="@mipmap/ic_launcher"
21-
android:roundIcon="@mipmap/ic_launcher_circle"
22-
android:label="@string/app_name"
23-
android:persistent="true"
24-
android:supportsRtl="false"
25-
android:theme="@style/AppTheme.Light"
26-
tools:ignore="GoogleAppIndexingWarning">
17+
<application
18+
android:allowBackup="true"
19+
android:fullBackupContent="@xml/full_backup_contents"
20+
android:name=".BlackbulbApplication"
21+
android:icon="@mipmap/ic_launcher"
22+
android:roundIcon="@mipmap/ic_launcher_circle"
23+
android:label="@string/app_name"
24+
android:persistent="true"
25+
android:supportsRtl="false"
26+
android:theme="@style/AppTheme.Light"
27+
tools:ignore="GoogleAppIndexingWarning">
2728

28-
<activity
29-
android:name=".ui.MainActivity"
30-
android:finishOnTaskLaunch="true"
31-
android:excludeFromRecents="false"
32-
android:launchMode="singleInstance"
33-
android:stateNotNeeded="true">
34-
<intent-filter>
35-
<action android:name="android.intent.action.MAIN" />
36-
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
29+
<activity
30+
android:name=".ui.MainActivity"
31+
android:finishOnTaskLaunch="true"
32+
android:excludeFromRecents="false"
33+
android:launchMode="singleInstance"
34+
android:stateNotNeeded="true">
35+
<intent-filter>
36+
<action android:name="android.intent.action.MAIN"/>
37+
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
3738

38-
<category android:name="android.intent.category.LAUNCHER" />
39-
</intent-filter>
39+
<category android:name="android.intent.category.LAUNCHER"/>
40+
</intent-filter>
4041

41-
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts"/>
42-
</activity>
42+
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts"/>
43+
</activity>
4344

4445
<activity
4546
android:name=".ui.MoreSettingsActivity"
@@ -53,49 +54,49 @@
5354
android:theme="@android:style/Theme.Material.Light"
5455
android:exported="false"/>
5556

56-
<activity android:name=".ui.shortcut.ToggleActivity"
57-
android:label="@string/shortcut_label_switch"
58-
android:icon="@mipmap/ic_shortcut_switch"
59-
android:launchMode="singleInstance"
60-
android:finishOnTaskLaunch="true"
61-
android:excludeFromRecents="true"
62-
android:theme="@style/AppTheme.Empty">
63-
<intent-filter>
64-
<action android:name="android.intent.action.MAIN" />
65-
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
66-
</intent-filter>
67-
</activity>
57+
<activity android:name=".ui.shortcut.ToggleActivity"
58+
android:label="@string/shortcut_label_switch"
59+
android:icon="@mipmap/ic_shortcut_switch"
60+
android:launchMode="singleInstance"
61+
android:finishOnTaskLaunch="true"
62+
android:excludeFromRecents="true"
63+
android:theme="@style/AppTheme.Empty">
64+
<intent-filter>
65+
<action android:name="android.intent.action.MAIN"/>
66+
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
67+
</intent-filter>
68+
</activity>
6869

69-
<service
70+
<service
7071
android:name=".service.MaskService"
7172
android:process=":mask"
7273
android:permission="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN">
73-
<intent-filter>
74-
<action android:name="info.papdt.blackblub.IMaskServiceInterface"/>
75-
</intent-filter>
76-
</service>
74+
<intent-filter>
75+
<action android:name="info.papdt.blackblub.IMaskServiceInterface"/>
76+
</intent-filter>
77+
</service>
7778

78-
<service
79-
android:name=".service.MaskTileService"
80-
android:icon="@drawable/ic_brightness_2_white_36dp"
81-
android:label="@string/app_name"
82-
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
83-
<intent-filter>
84-
<action android:name="android.service.quicksettings.action.QS_TILE" />
85-
</intent-filter>
86-
</service>
79+
<service
80+
android:name=".service.MaskTileService"
81+
android:icon="@drawable/ic_brightness_2_white_36dp"
82+
android:label="@string/app_name"
83+
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
84+
<intent-filter>
85+
<action android:name="android.service.quicksettings.action.QS_TILE"/>
86+
</intent-filter>
87+
</service>
8788

88-
<receiver
89+
<receiver
8990
android:name=".receiver.ActionReceiver"
9091
android:exported="true"
9192
android:permission="info.papdt.blackbulb.permission.CONTROL_NIGHT_SCREEN">
92-
<intent-filter>
93-
<action android:name="info.papdt.blackbulb.ACTION_UPDATE_STATUS" />
94-
<action android:name="info.papdt.blackbulb.ALARM_ACTION_START" />
95-
<action android:name="info.papdt.blackbulb.ALARM_ACTION_STOP" />
96-
</intent-filter>
97-
</receiver>
93+
<intent-filter>
94+
<action android:name="info.papdt.blackbulb.ACTION_UPDATE_STATUS"/>
95+
<action android:name="info.papdt.blackbulb.ALARM_ACTION_START"/>
96+
<action android:name="info.papdt.blackbulb.ALARM_ACTION_STOP"/>
97+
</intent-filter>
98+
</receiver>
9899

99-
</application>
100+
</application>
100101

101102
</manifest>

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
google()
1313
}
1414
dependencies {
15-
classpath 'com.android.tools.build:gradle:3.3.0'
15+
classpath 'com.android.tools.build:gradle:3.3.1'
1616
}
1717
}
1818

0 commit comments

Comments
 (0)