Search in sources :

Example 11 with ILocationProvider

use of com.android.internal.location.ILocationProvider in project platform_frameworks_base by android.

the class LocationProviderProxy method setRequest.

@Override
public void setRequest(ProviderRequest request, WorkSource source) {
    synchronized (mLock) {
        mRequest = request;
        mWorksource = source;
    }
    ILocationProvider service = getService();
    if (service == null)
        return;
    try {
        service.setRequest(request, source);
    } catch (RemoteException e) {
        Log.w(TAG, e);
    } catch (Exception e) {
        // never let remote service crash system server
        Log.e(TAG, "Exception from " + mServiceWatcher.getBestPackageName(), e);
    }
}
Also used : ILocationProvider(com.android.internal.location.ILocationProvider) RemoteException(android.os.RemoteException) IOException(java.io.IOException) RemoteException(android.os.RemoteException)

Example 12 with ILocationProvider

use of com.android.internal.location.ILocationProvider in project android_frameworks_base by DirtyUnicorns.

the class LocationProviderProxy method dump.

@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    pw.append("REMOTE SERVICE");
    pw.append(" name=").append(mName);
    pw.append(" pkg=").append(mServiceWatcher.getBestPackageName());
    pw.append(" version=").append("" + mServiceWatcher.getBestVersion());
    pw.append('\n');
    ILocationProvider service = getService();
    if (service == null) {
        pw.println("service down (null)");
        return;
    }
    pw.flush();
    try {
        service.asBinder().dump(fd, args);
    } catch (RemoteException e) {
        pw.println("service down (RemoteException)");
        Log.w(TAG, e);
    } catch (Exception e) {
        pw.println("service down (Exception)");
        // never let remote service crash system server
        Log.e(TAG, "Exception from " + mServiceWatcher.getBestPackageName(), e);
    }
}
Also used : ILocationProvider(com.android.internal.location.ILocationProvider) RemoteException(android.os.RemoteException) RemoteException(android.os.RemoteException)

Aggregations

RemoteException (android.os.RemoteException)12 ILocationProvider (com.android.internal.location.ILocationProvider)12 IOException (java.io.IOException)2