From a889f671d74abb76405170355693936a7a3481f3 Mon Sep 17 00:00:00 2001 From: Arjan Schrijver Date: Wed, 12 Jun 2024 22:43:15 +0200 Subject: [PATCH] Improve permissions descriptions --- .../gadgetbridge/util/PermissionsUtils.java | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/PermissionsUtils.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/PermissionsUtils.java index 8cf6ff169..ac3b2d9cb 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/PermissionsUtils.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/PermissionsUtils.java @@ -62,47 +62,47 @@ public class PermissionsUtils { permissionsList.add(new PermissionDetails( CUSTOM_PERM_NOTIFICATION_SERVICE, "Manage Do Not Disturb", - "Change DND notification policy")); + "Changing DND notification policy")); permissionsList.add(new PermissionDetails( CUSTOM_PERM_DISPLAY_OVER, "Display over other apps", - "Used by Bangle.js to start apps and other functionality on your phone")); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && Build.VERSION.SDK_INT <= Build.VERSION_CODES.S) { - permissionsList.add(new PermissionDetails( - Manifest.permission.ACCESS_BACKGROUND_LOCATION, - "Background location", - "Required for scanning for Bluetooth devices")); + "Used by Bangle.js for starting apps and other functionality on your phone")); } permissionsList.add(new PermissionDetails( Manifest.permission.ACCESS_FINE_LOCATION, "Fine location", - "Send location to gadgets which don't have GPS")); + "Scanning for Bluetooth devices")); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + permissionsList.add(new PermissionDetails( + Manifest.permission.ACCESS_BACKGROUND_LOCATION, + "Background location", + "Scanning for Bluetooth devices in the background and sending the location to certain gadgets")); + } if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { permissionsList.add(new PermissionDetails( Manifest.permission.BLUETOOTH, "Bluetooth", - "Connect to Bluetooth devices")); + "Connecting to Bluetooth devices")); permissionsList.add(new PermissionDetails( Manifest.permission.BLUETOOTH_ADMIN, "Bluetooth admin", - "Discover and pair Bluetooth devices")); + "Discovering and pairing Bluetooth devices")); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { permissionsList.add(new PermissionDetails( Manifest.permission.BLUETOOTH_SCAN, "Bluetooth scan", - "Scan for Bluetooth devices")); + "Scanning for new Bluetooth devices")); permissionsList.add(new PermissionDetails( Manifest.permission.BLUETOOTH_CONNECT, "Bluetooth connect", - "Connect to Bluetooth devices")); + "Connecting to already-paired Bluetooth devices")); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { permissionsList.add(new PermissionDetails( Manifest.permission.POST_NOTIFICATIONS, "Post notifications", - "Post ongoing notification which keeps the service running")); + "Posting ongoing notification which keeps the service running")); } if (BuildConfig.INTERNET_ACCESS) { permissionsList.add(new PermissionDetails( @@ -117,40 +117,40 @@ public class PermissionsUtils { permissionsList.add(new PermissionDetails( Manifest.permission.READ_CONTACTS, "Contacts", - "Send contacts to gadgets")); + "Sending contacts to gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.READ_CALENDAR, "Calendar", - "Send calendar to gadgets")); + "Sending calendar to gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.RECEIVE_SMS, "Receive SMS", - "Forward SMS messages to gadgets")); + "Forwarding SMS messages to gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.SEND_SMS, "Send SMS", - "Send SMS (canned response) from gadgets")); + "Sending SMS (canned response) from gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.READ_CALL_LOG, "Read call log", - "Forward call log to gadgets")); + "Forwarding call log to gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.READ_PHONE_STATE, "Read phone state", - "Read status of ongoing calls")); + "Reading status of ongoing calls")); permissionsList.add(new PermissionDetails( Manifest.permission.CALL_PHONE, "Call phone", - "Initiate phone calls from gadgets")); + "Initiating phone calls from gadgets")); permissionsList.add(new PermissionDetails( Manifest.permission.PROCESS_OUTGOING_CALLS, "Process outgoing calls", - "Read the number of an outgoing call to display it on a gadget")); + "Reading the number of an outgoing call to display it on a gadget")); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { permissionsList.add(new PermissionDetails( Manifest.permission.ANSWER_PHONE_CALLS, "Answer phone calls", - "Answer phone calls from gadgets")); + "Answering phone calls from gadgets")); } if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) { permissionsList.add(new PermissionDetails( @@ -162,7 +162,7 @@ public class PermissionsUtils { permissionsList.add(new PermissionDetails( Manifest.permission.QUERY_ALL_PACKAGES, "Query all packages", - "Read names and icons of all installed apps")); + "Reading names and icons of all installed apps")); } return permissionsList; }