public static void addService(String name, IBinder service) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.addService(name, service); } catch (RemoteException e) { e.printStackTrace(); } } }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
public static IBinder getService(String name) { if (VirtualCore.get().isServerProcess()) { return ServiceCache.getService(name); } IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { return fetcher.getService(name); } catch (RemoteException e) { e.printStackTrace(); } } VLog.e(TAG, "GetService(%s) return null.", name); return null; }
public static void removeService(String name) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.removeService(name); } catch (RemoteException e) { e.printStackTrace(); } } }
public static void removeService(String name) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.removeService(name); } catch (RemoteException e) { e.printStackTrace(); } } }
public static void removeService(String name) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.removeService(name); } catch (RemoteException e) { e.printStackTrace(); } } }
public static void addService(String name, IBinder service) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.addService(name, service); } catch (RemoteException e) { e.printStackTrace(); } } }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
public static IBinder getService(String name) { if (VirtualCore.get().isServerProcess()) { return ServiceCache.getService(name); } IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { return fetcher.getService(name); } catch (RemoteException e) { e.printStackTrace(); } } VLog.e(TAG, "GetService(%s) return null.", name); return null; }
public static void addService(String name, IBinder service) { IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { fetcher.addService(name, service); } catch (RemoteException e) { e.printStackTrace(); } } }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
public static IBinder getService(String name) { if (VirtualCore.get().isServerProcess()) { return ServiceCache.getService(name); } IServiceFetcher fetcher = getServiceFetcher(); if (fetcher != null) { try { return fetcher.getService(name); } catch (RemoteException e) { e.printStackTrace(); } } VLog.e(TAG, "GetService(%s) return null.", name); return null; }