0

I am dealing with runtime permission requesting for my app so that I can upgrade to API 23. From trial and error, it appears that the GET_ACCOUNT and MANAGE_ACCOUNT are no longer required for SyncAdapter with stub ContentProvider and Authenticator?

I even removed the permissions from manifest and nothing seems broken. Is this a new change? I remember ~1 year ago I tried finding a way to not have to include those permissions (since I was only using a stub authenticator) and it wasn't possible.

Is there any explanation for this? Just want to make sure those permissions are really no longer needed and that I am not breaking some underlying thing by removing them.

David Medenjak
  • 33,993
  • 14
  • 106
  • 134
Asd
  • 303
  • 2
  • 7

1 Answers1

1

Yes. Some things changed, but you should probably still keep them included in your manifest (especially if you are also targeting devices with android < 23).

You do not specify which methods you use that required this permission, but you can e.g. see it with AccountManager.getAccountsByType(String) where it says:

NOTE: If targeting your app to work on API level 22 and before, GET_ACCOUNTS permission is needed for those platforms, irrespective of uid or signature match. See docs for this function in API level 22.

So yes, some methods changed, but to remain on the safe side (and be compatible with older android versions) you should still include those permissions.

David Medenjak
  • 33,993
  • 14
  • 106
  • 134