/** * Install the condom protection for current process if its process name matches. This method should be called in {@link Application#onCreate()}. * * @param process_names list of processes where Condom process should NOT be installed, in the form exactly as defined * by <code>"android:process"</code> attribute of components in <code>AndroidManifest.xml</code>. * <b>BEWARE: Default process must be explicitly listed here if it is expected to be excluded.</b> */ public static void installExcept(final Application app, final CondomOptions options, final String... process_names) { if (process_names.length == 0) throw new IllegalArgumentException("At lease one process name must be specified"); validateCondomOptions(options); final String current_process_name = getProcessName(app); if (current_process_name == null) return; for (final String process_name : process_names) if (! current_process_name.equals(getFullProcessName(app, process_name))) { install(app, current_process_name, options); return; } if ((app.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) validateProcessNames(app, process_names); }
/** * Install the condom protection for current process if its process name matches. This method should be called in {@link Application#onCreate()}. * * @param process_names list of processes where Condom process should NOT be installed, in the form exactly as defined * by <code>"android:process"</code> attribute of components in <code>AndroidManifest.xml</code>. * <b>BEWARE: Default process must be explicitly listed here if it is expected to be excluded.</b> */ public static void installExcept(final Application app, final CondomOptions options, final String... process_names) { if (process_names.length == 0) throw new IllegalArgumentException("At lease one process name must be specified"); validateCondomOptions(options); final String current_process_name = getProcessName(app); if (current_process_name == null) return; for (final String process_name : process_names) if (! current_process_name.equals(getFullProcessName(app, process_name))) { install(app, current_process_name, options); return; } if ((app.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) validateProcessNames(app, process_names); }