try {
Class cls = SharedPreferences.Editor.class;
sApplyMethod = cls.getMethod("apply");
} catch (NoSuchMethodException unused) {
sApplyMethod = null;
}
if (sApplyMethod != null) {
try {
sApplyMethod.invoke(editor);
return;
} catch (InvocationTargetException unused) {
// fall through
} catch (IllegalAccessException unused) {
// fall through
}
}
editor.commit();