Telephony: Allow getCellLocation() if client has permission ACCESS_FINE_LOCATION

ACCESS_FINE_LOCATION should imply ACCESS_COARSE_LOCATION, so either of these
permissions should be sufficient to allow TelephonyManager.getCellLocation().

Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 22af02b..88f47fd 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -112,9 +112,13 @@
         if (events != 0) {
             // check permissions
             if ((events & PhoneStateListener.LISTEN_CELL_LOCATION) != 0) {
-                mContext.enforceCallingOrSelfPermission(
-                        android.Manifest.permission.ACCESS_COARSE_LOCATION, null);
-
+                // ACCESS_FINE_LOCATION implies ACCESS_COARSE_LOCATION
+                if (mContext.checkCallingPermission(
+                        android.Manifest.permission.ACCESS_FINE_LOCATION)
+                        != PackageManager.PERMISSION_GRANTED) {
+                    mContext.enforceCallingOrSelfPermission(
+                            android.Manifest.permission.ACCESS_COARSE_LOCATION, null);
+                }
             }
 
             synchronized (mRecords) {