change the way video limit is stored

This commit is contained in:
tibbi
2016-11-06 13:09:42 +01:00
parent f634df285b
commit 52190cf797
3 changed files with 46 additions and 9 deletions

View File

@@ -64,14 +64,29 @@ public class Config {
private int getOldDefaultResolution() {
final int index = getMaxResolution();
switch (index) {
case 1: return Constants.EIGHT_MPX;
case 2: return 0;
default: return Constants.FIVE_MPX;
case 1:
return Constants.EIGHT_MPX;
case 2:
return 0;
default:
return Constants.FIVE_MPX;
}
}
public int getMaxVideoResolution() {
return mPrefs.getInt(Constants.MAX_VIDEO_RESOLUTION, 1);
int maxRes = mPrefs.getInt(Constants.MAX_VIDEO_RESOLUTION, Constants.P720);
switch (maxRes) {
case 0:
maxRes = Constants.P480;
break;
case 1:
maxRes = Constants.P720;
break;
case 2:
maxRes = Constants.P1080;
break;
}
return maxRes;
}
public void setMaxVideoResolution(int maxRes) {