FileDocCategorySizeDatePackage
GpsStatusListenerHelper.javaAPI DocAndroid 5.1 API3848Thu Mar 12 22:22:42 GMT 2015com.android.server.location

GpsStatusListenerHelper

public abstract class GpsStatusListenerHelper extends RemoteListenerHelper
Implementation of a handler for {@link IGpsStatusListener}.

Fields Summary
Constructors Summary
public GpsStatusListenerHelper(android.os.Handler handler)

        super(handler, "GpsStatusListenerHelper");

        Operation nullOperation = new Operation() {
            @Override
            public void execute(IGpsStatusListener iGpsStatusListener) throws RemoteException {}
        };
        setSupported(GpsLocationProvider.isSupported(), nullOperation);
    
Methods Summary
protected ListenerOperationgetHandlerOperation(int result)

        return null;
    
protected voidhandleGpsEnabledChanged(boolean enabled)

        Operation operation;
        if (enabled) {
            operation = new Operation() {
                @Override
                public void execute(IGpsStatusListener listener) throws RemoteException {
                    listener.onGpsStarted();
                }
            };
        } else {
            operation = new Operation() {
                @Override
                public void execute(IGpsStatusListener listener) throws RemoteException {
                    listener.onGpsStopped();
                }
            };
        }
        foreach(operation);
    
public voidonFirstFix(int timeToFirstFix)

        Operation operation = new Operation() {
            @Override
            public void execute(IGpsStatusListener listener) throws RemoteException {
                listener.onFirstFix(timeToFirstFix);
            }
        };
        foreach(operation);
    
public voidonNmeaReceived(long timestamp, java.lang.String nmea)

        Operation operation = new Operation() {
            @Override
            public void execute(IGpsStatusListener listener) throws RemoteException {
                listener.onNmeaReceived(timestamp, nmea);
            }
        };
        foreach(operation);
    
public voidonSvStatusChanged(int svCount, int[] prns, float[] snrs, float[] elevations, float[] azimuths, int ephemerisMask, int almanacMask, int usedInFixMask)

        Operation operation = new Operation() {
            @Override
            public void execute(IGpsStatusListener listener) throws RemoteException {
                listener.onSvStatusChanged(
                        svCount,
                        prns,
                        snrs,
                        elevations,
                        azimuths,
                        ephemerisMask,
                        almanacMask,
                        usedInFixMask);
            }
        };
        foreach(operation);
    
protected booleanregisterWithService()

        return true;
    
protected voidunregisterFromService()