|
|
|
@ -29,7 +29,7 @@ public class Resetter {
|
|
|
|
|
private static final String DEVICE_ID_KEY = DEFAULT_VENDOR + ".device_id";
|
|
|
|
|
private static final String IDE_EVAL_PREFIX = DEFAULT_VENDOR + "/" + Constants.IDE_NAME_LOWER + "/" + Constants.IDE_HASH;
|
|
|
|
|
private static final String EVAL_KEY = "evlsprt";
|
|
|
|
|
private static final String AUTO_RESET_KEY = Constants.PLUGIN_PREFS_PREFIX + ".auto_reset";
|
|
|
|
|
private static final String AUTO_RESET_KEY = Constants.PLUGIN_PREFS_PREFIX + ".auto_reset." + Constants.IDE_NAME_LOWER + "." + Constants.IDE_HASH;
|
|
|
|
|
|
|
|
|
|
private static final PropertiesComponentImpl PROPS = (PropertiesComponentImpl) PropertiesComponent.getInstance();
|
|
|
|
|
|
|
|
|
@ -145,6 +145,8 @@ public class Resetter {
|
|
|
|
|
} else {
|
|
|
|
|
Prefs.remove(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
syncPrefs();
|
|
|
|
|
break;
|
|
|
|
|
case PROPERTY:
|
|
|
|
|
PROPS.unsetValue(key);
|
|
|
|
@ -158,6 +160,15 @@ public class Resetter {
|
|
|
|
|
|
|
|
|
|
public static void setAutoReset(boolean isAutoReset) {
|
|
|
|
|
Prefs.putBoolean(AUTO_RESET_KEY, isAutoReset);
|
|
|
|
|
syncPrefs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void syncPrefs() {
|
|
|
|
|
try {
|
|
|
|
|
Preferences.userRoot().sync();
|
|
|
|
|
} catch (BackingStoreException e) {
|
|
|
|
|
NotificationHelper.showError(null, "Flush preferences failed!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected static File getSharedFile(String fileName) {
|
|
|
|
|