Search in sources :

Example 6 with ILocationProvider

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

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)

Example 7 with ILocationProvider

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

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) RemoteException(android.os.RemoteException)

Example 8 with ILocationProvider

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

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)

Example 9 with ILocationProvider

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

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) RemoteException(android.os.RemoteException)

Example 10 with ILocationProvider

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

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