Skip to content

Commit e37b824

Browse files
refactor: Updated permissions screen and dependencies
Enhanced user experience and app stability: - Reorganized permissions on the permissions screen into "Normal," "Runtime," and "Special" categories for better clarity. - Added "Wake Lock" permission to the "Normal" category with a detailed summary. - Updated the app version code to 38. - Added `WAKE_LOCK` permission to `AndroidManifest.xml`.
1 parent 76a4d9d commit e37b824

File tree

5 files changed

+156
-26
lines changed

5 files changed

+156
-26
lines changed

.idea/workspace.xml

Lines changed: 126 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
applicationId 'com.d4rk.androidtutorials.java'
1313
minSdk 23
1414
targetSdk 36
15-
versionCode 35
15+
versionCode 38
1616
versionName '5.0.1'
1717
archivesBaseName = "${applicationId}-v${versionName}"
1818
vectorDrawables.useSupportLibrary = true

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<uses-permission android:name="com.android.vending.BILLING" />
1111
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
1212
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
13+
<uses-permission android:name="android.permission.WAKE_LOCK" />
1314

1415
<queries>
1516
<intent>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,11 @@
256256
<string name="code_of_conduct">Code of conduct</string>
257257
<string name="permissions">Permissions</string>
258258
<string name="normal">Normal</string>
259+
<string name="special">Special</string>
259260
<string name="ad_id">Ad id [AD_ID]</string>
260261
<string name="internet">Internet [INTERNET]</string>
262+
<string name="wake_lock">Keep device awake [WAKE_LOCK]</string>
263+
<string name="summary_preference_permissions_wake_lock">Allows the app to prevent the device from going to sleep (e.g., screen dimming or processor sleeping) during critical operations to ensure they complete without interruption. This is used sparingly to conserve battery.</string>
261264
<string name="post_notifications">Post notifications [POST_NOTIFICATIONS]</string>
262265
<string name="runtime">Runtime</string>
263266
<string name="access_network_state">Access network state [ACCESS_NETWORK_STATE]</string>

app/src/main/res/xml/preferences_permissions.xml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,52 @@
33
<androidx.preference.PreferenceCategory
44
app:iconSpaceReserved="false"
55
app:title="@string/normal">
6+
<androidx.preference.Preference
7+
app:iconSpaceReserved="false"
8+
app:summary="@string/summary_preference_permissions_access_network_state"
9+
app:title="@string/access_network_state" />
610
<androidx.preference.Preference
711
app:iconSpaceReserved="false"
812
app:summary="@string/summary_preference_permissions_ad_id"
913
app:title="@string/ad_id"
1014
app:useSimpleSummaryProvider="true" />
15+
<androidx.preference.Preference
16+
app:iconSpaceReserved="false"
17+
app:summary="@string/summary_preference_permissions_billing"
18+
app:title="@string/billing" />
19+
<androidx.preference.Preference
20+
app:iconSpaceReserved="false"
21+
app:summary="@string/summary_preference_permissions_check_license"
22+
app:title="@string/check_license" />
23+
<androidx.preference.Preference
24+
app:iconSpaceReserved="false"
25+
app:summary="@string/summary_preference_permissions_foreground_service"
26+
app:title="@string/foreground_service" />
1127
<androidx.preference.Preference
1228
app:iconSpaceReserved="false"
1329
app:summary="@string/summary_preference_permissions_internet"
1430
app:title="@string/internet"
1531
app:useSimpleSummaryProvider="true" />
1632
<androidx.preference.Preference
1733
app:iconSpaceReserved="false"
18-
app:summary="@string/summary_preference_permissions_post_notifications"
19-
app:title="@string/post_notifications" />
34+
app:summary="@string/summary_preference_permissions_wake_lock"
35+
app:title="@string/wake_lock"
36+
app:useSimpleSummaryProvider="true" />
2037
</androidx.preference.PreferenceCategory>
2138
<androidx.preference.PreferenceCategory
2239
app:iconSpaceReserved="false"
2340
app:title="@string/runtime">
2441
<androidx.preference.Preference
2542
app:iconSpaceReserved="false"
26-
app:summary="@string/summary_preference_permissions_access_network_state"
27-
app:title="@string/access_network_state" />
43+
app:summary="@string/summary_preference_permissions_post_notifications"
44+
app:title="@string/post_notifications" />
45+
</androidx.preference.PreferenceCategory>
46+
<androidx.preference.PreferenceCategory
47+
app:iconSpaceReserved="false"
48+
app:title="@string/special">
2849
<androidx.preference.Preference
2950
app:iconSpaceReserved="false"
3051
app:summary="@string/summary_preference_permissions_access_notification_policy"
3152
app:title="@string/access_notification_policy" />
32-
<androidx.preference.Preference
33-
app:iconSpaceReserved="false"
34-
app:summary="@string/summary_preference_permissions_billing"
35-
app:title="@string/billing" />
36-
<androidx.preference.Preference
37-
app:iconSpaceReserved="false"
38-
app:summary="@string/summary_preference_permissions_check_license"
39-
app:title="@string/check_license" />
40-
<androidx.preference.Preference
41-
app:iconSpaceReserved="false"
42-
app:summary="@string/summary_preference_permissions_foreground_service"
43-
app:title="@string/foreground_service" />
4453
</androidx.preference.PreferenceCategory>
4554
</androidx.preference.PreferenceScreen>

0 commit comments

Comments
 (0)