public Bundle getCellLocation() { try { mApp.mContext.enforceCallingOrSelfPermission( android.Manifest.permission.ACCESS_FINE_LOCATION, null); } catch (SecurityException e) { // If we have ACCESS_FINE_LOCATION permission, skip the check for ACCESS_COARSE_LOCATION // A failure should throw the SecurityException from ACCESS_COARSE_LOCATION since this // is the weaker precondition mApp.mContext.enforceCallingOrSelfPermission( android.Manifest.permission.ACCESS_COARSE_LOCATION, null); } Bundle data = new Bundle(); mPhone.getCellLocation().fillInNotifierBundle(data); return data; }