Compare commits

..

3 commits

Author SHA1 Message Date
Peter Cai bb281ab7e0 do not use Dialer UI for incoming calls if audio permission is not granted
We cannot request new permissions when Dialer UI is shown. For incoming
calls, if the Dialer UI is displayed over keyguard, then the user may
not even be able to see the permission notifications that we use for
outgoing calls.

If we just do not use the Dialer UI when the permission is not granted,
it is at most a minor annoyance for the first time. After the user has
accepted an incoming call even just once, the permission will be
granted, and the Dialer integration will start to work just fine.
2022-03-11 22:04:58 -05:00
Peter Cai 729b86a2fc ConnectionService: miscellaneous fixes
* Fix a few potential errors due to the use of newer APIs (minSDK is
  still only 24)
* Fix one remaining case of raw usage of generic types.
2022-03-11 22:04:32 -05:00
Peter Cai 0cd0678921 ConnectionService: Dialer UI integration for incoming calls 2022-03-11 22:04:29 -05:00

View file

@ -117,9 +117,9 @@ public class ConnectionService extends android.telecom.ConnectionService {
PermissionManager permissionManager = PermissionManager.getInstance(this);
permissionManager.setNotificationSettings(
new NotificationSettings.Builder()
.withMessage(R.string.microphone_permission_for_call)
.withSmallIcon(R.drawable.ic_notification).build()
new NotificationSettings.Builder()
.withMessage(R.string.microphone_permission_for_call)
.withSmallIcon(R.drawable.ic_notification).build()
);
Set<String> permissions = new HashSet<>();