}
return Process.myPid();
}
+
+ @Override
+ public void crashIntentionallyForTesting() {
+ Process.killProcess(Process.myPid());
+ }
};
/* package */ static Context getContext() {
}
}
try {
- LibraryLoader.loadNow();
+ LibraryLoader.loadNow(getApplicationContext(), false);
} catch (ProcessInitException e) {
Log.e(TAG, "Failed to load native library, exiting child process", e);
System.exit(-1);
}
}
+ @SuppressWarnings("unused")
+ @CalledByNative
+ private Surface getSurfaceTextureSurface(int primaryId, int secondaryId) {
+ if (mCallback == null) {
+ Log.e(TAG, "No callback interface has been provided.");
+ return null;
+ }
+
+ try {
+ return mCallback.getSurfaceTextureSurface(primaryId, secondaryId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Unable to call getSurfaceTextureSurface: " + e);
+ return null;
+ }
+ }
+
/**
* The main entry point for a child process. This should be called from a new thread since
* it will not return until the child process exits. See child_process_service.{h,cc}