示例#1
0
  // TODO make all layers profile preferenced????
  private OsmandSettings(OsmandApplication ctx) {
    this.ctx = ctx;
    globalPreferences =
        ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
    // start from default settings
    currentMode = ApplicationMode.DEFAULT;

    defaultProfilePreferences = getProfilePreferences(ApplicationMode.DEFAULT);
    profilePreferences = defaultProfilePreferences;
    //		if(FOLLOW_TO_THE_ROUTE.get()){
    currentMode = readApplicationMode();
    profilePreferences = getProfilePreferences(currentMode);
    //		}
  }
示例#2
0
 private SharedPreferences getProfilePreferences(ApplicationMode mode) {
   return ctx.getSharedPreferences(getSharedPreferencesName(mode), Context.MODE_WORLD_READABLE);
 }