Skip to content

Commit

Permalink
add set setting ASSETS
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Feb 1, 2020
1 parent ded6f29 commit 3d46df4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@ public static VS_SOURCE getVS_SOURCE(final Context context){
return ret;
}

public static void setVS_SOURCE(final Context context,final VS_SOURCE val){
@SuppressLint("ApplySharedPref")
public static void setVS_SOURCE(final Context context, final VS_SOURCE val){
SharedPreferences sharedPreferences=context.getSharedPreferences("pref_video", MODE_PRIVATE);
sharedPreferences.edit().putInt(context.getString(R.string.VS_SOURCE),val.ordinal()).commit();
}

@SuppressLint("ApplySharedPref")
public static void setVS_ASSETS_FILENAME_TEST_ONLY(final Context context, final String filename){
SharedPreferences sharedPreferences=context.getSharedPreferences("pref_video", MODE_PRIVATE);
sharedPreferences.edit().putString(context.getString(R.string.VS_ASSETS_FILENAME_TEST_ONLY),filename).commit();
}

private static String getDirectory(){
return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+"/FPV_VR/";
}
Expand Down

0 comments on commit 3d46df4

Please sign in to comment.