Merge pull request #188 from ultrasonic/fix_wrong_server_settings

Fix inconsistent behaviour when adding new server on debug build.
This commit is contained in:
Yahor Berdnikau 2018-04-04 20:33:11 +02:00 committed by GitHub
commit 2ac346441b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -131,9 +131,6 @@ public final class Constants
public static final String PREFERENCES_KEY_SCAN_MEDIA = "scanMedia";
public static final String PREFERENCES_KEY_IMAGE_LOADER_CONCURRENCY = "imageLoaderConcurrency";
// Name of the preferences file.
public static final String PREFERENCES_FILE_NAME = "org.moire.ultrasonic_preferences";
// Number of free trial days for non-licensed servers.
public static final int FREE_TRIAL_DAYS = 30;

View File

@ -398,10 +398,9 @@ public class Util extends DownloadActivity
return builder.toString();
}
public static SharedPreferences getPreferences(Context context)
{
return context.getSharedPreferences(Constants.PREFERENCES_FILE_NAME, 0);
}
public static SharedPreferences getPreferences(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context);
}
public static int getRemainingTrialDays(Context context)
{