Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a76fd62 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

LocationManagerService: Add null pointer check and remove useless finalize() method.



Change-Id: I4017d38a1bea7564a85575486a7c2aef569dfe5d
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 2bd4326a
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -854,8 +854,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
         */
        void disposeLocked() {
            ArrayList<UpdateRecord> records = mRecordsByProvider.get(this.mProvider);
            if (records != null) {
                records.remove(this);
            }
        }

        @Override
        public String toString() {
@@ -873,15 +875,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
            mLastFixBroadcast.dump(new PrintWriterPrinter(pw), prefix + "  ");
            pw.println(prefix + "mLastStatusBroadcast=" + mLastStatusBroadcast);
        }
        
        /**
         * Calls dispose().
         */
        @Override protected void finalize() {
            synchronized (mLock) {
                disposeLocked();
            }
        }
    }

    private Receiver getReceiver(ILocationListener listener) {