@SuppressLint("PrivateApi") private static void installCondomProcessPackageManager(final CondomCore condom)
			throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
		final Class<?> ActivityThread = Class.forName("android.app.ActivityThread");
		final Field ActivityThread_sPackageManager = ActivityThread.getDeclaredField("sPackageManager");
		ActivityThread_sPackageManager.setAccessible(true);
		final Class<?> IPackageManager = Class.forName("android.content.pm.IPackageManager");

		final Object pm = ActivityThread_sPackageManager.get(null);
		final InvocationHandler handler;
		if (Proxy.isProxyClass(pm.getClass()) && (handler = Proxy.getInvocationHandler(pm)) instanceof CondomProcessPackageManager) {
			Log.w(TAG, "CondomPackageManager was already installed in this process.");
			((CondomProcessPackageManager) handler).mCondom = condom;
		} else {
			final Object condom_pm = Proxy.newProxyInstance(condom.mBase.getClassLoader(), new Class[] { IPackageManager },
					new CondomProcessPackageManager(condom, pm));
			ActivityThread_sPackageManager.set(null, condom_pm);
		}
	}
Install the condom protection for current process. This method should generally never be called in the main process of app.

<p>It is suggested to use {@link android.content.ContentProvider ContentProvider} with "android:process", to install it in specified process.
library/src/main/java/com/oasisfeng/condom/CondomProcess.java