0

The following question is similar to this. how are android security permissions checked at run-time?

But the platform.xml file doesn't contain gid for location permissions. Where can i find it?. In which source code is the location permissions are managed?. I'm new to the AOSP

1 Answers1

1

permissions are located in AndroidManifest.xml like this

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

and if you are running Android 6. You mask ask for a permission at runtime (c docs) https://developer.android.com/training/permissions/requesting.html#perm-check

also please note that some of the permissions can be simply declared at the manifest and you don't have to ask for them at runtime.

ps platform.xml, where did you get that from?

Jack
  • 1,545
  • 2
  • 11
  • 20
  • I know that already .What i asked is that where is that implemented in the android os source code. Have you gone through the link i provided. It shows the android source code where each permission is mapped to a gid .But there is nothing for Location permissions. platform.xml is in the android source code https://github.com/aosp-mirror/platform_frameworks_base/blob/master/data/etc/platform.xml –  Mar 25 '18 at 13:31