Loading core/java/android/hardware/location/GeofenceHardwareImpl.java +40 −34 Original line number Diff line number Diff line Loading @@ -470,11 +470,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceAdd(geofenceId, msg.arg2); } catch (RemoteException e) {Log.i(TAG, "Remote Exception:" + e);} } releaseWakeLock(); break; case REMOVE_GEOFENCE_CALLBACK: Loading @@ -482,14 +483,15 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceRemove(geofenceId, msg.arg2); } catch (RemoteException e) {} synchronized (mGeofences) { mGeofences.remove(geofenceId); } } releaseWakeLock(); break; Loading @@ -498,11 +500,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofencePause(geofenceId, msg.arg2); } catch (RemoteException e) {} } releaseWakeLock(); break; Loading @@ -511,11 +514,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceResume(geofenceId, msg.arg2); } catch (RemoteException e) {} } releaseWakeLock(); break; Loading @@ -530,12 +534,14 @@ public final class GeofenceHardwareImpl { " Transition: " + geofenceTransition.mTransition + " Location: " + geofenceTransition.mLocation + ":" + mGeofences); if (callback != null) { try { callback.onGeofenceTransition( geofenceTransition.mGeofenceId, geofenceTransition.mTransition, geofenceTransition.mLocation, geofenceTransition.mTimestamp, GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE); } catch (RemoteException e) {} } releaseWakeLock(); break; case GEOFENCE_CALLBACK_BINDER_DIED: Loading Loading @@ -572,8 +578,7 @@ public final class GeofenceHardwareImpl { available = (val == GeofenceHardware.MONITOR_CURRENTLY_AVAILABLE ? true : false); callbackList = mCallbacks[GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE]; if (callbackList == null) return; if (callbackList != null) { if (DEBUG) Log.d(TAG, "MonitoringSystemChangeCallback: GPS : " + available); for (IGeofenceHardwareMonitorCallback c: callbackList) { Loading @@ -583,6 +588,7 @@ public final class GeofenceHardwareImpl { location); } catch (RemoteException e) {} } } releaseWakeLock(); break; case CALLBACK_ADD: Loading Loading
core/java/android/hardware/location/GeofenceHardwareImpl.java +40 −34 Original line number Diff line number Diff line Loading @@ -470,11 +470,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceAdd(geofenceId, msg.arg2); } catch (RemoteException e) {Log.i(TAG, "Remote Exception:" + e);} } releaseWakeLock(); break; case REMOVE_GEOFENCE_CALLBACK: Loading @@ -482,14 +483,15 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceRemove(geofenceId, msg.arg2); } catch (RemoteException e) {} synchronized (mGeofences) { mGeofences.remove(geofenceId); } } releaseWakeLock(); break; Loading @@ -498,11 +500,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofencePause(geofenceId, msg.arg2); } catch (RemoteException e) {} } releaseWakeLock(); break; Loading @@ -511,11 +514,12 @@ public final class GeofenceHardwareImpl { synchronized (mGeofences) { callback = mGeofences.get(geofenceId); } if (callback == null) return; if (callback != null) { try { callback.onGeofenceResume(geofenceId, msg.arg2); } catch (RemoteException e) {} } releaseWakeLock(); break; Loading @@ -530,12 +534,14 @@ public final class GeofenceHardwareImpl { " Transition: " + geofenceTransition.mTransition + " Location: " + geofenceTransition.mLocation + ":" + mGeofences); if (callback != null) { try { callback.onGeofenceTransition( geofenceTransition.mGeofenceId, geofenceTransition.mTransition, geofenceTransition.mLocation, geofenceTransition.mTimestamp, GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE); } catch (RemoteException e) {} } releaseWakeLock(); break; case GEOFENCE_CALLBACK_BINDER_DIED: Loading Loading @@ -572,8 +578,7 @@ public final class GeofenceHardwareImpl { available = (val == GeofenceHardware.MONITOR_CURRENTLY_AVAILABLE ? true : false); callbackList = mCallbacks[GeofenceHardware.MONITORING_TYPE_GPS_HARDWARE]; if (callbackList == null) return; if (callbackList != null) { if (DEBUG) Log.d(TAG, "MonitoringSystemChangeCallback: GPS : " + available); for (IGeofenceHardwareMonitorCallback c: callbackList) { Loading @@ -583,6 +588,7 @@ public final class GeofenceHardwareImpl { location); } catch (RemoteException e) {} } } releaseWakeLock(); break; case CALLBACK_ADD: Loading