Bug Details: For example, 4:3 is 200W, cut into full-screen 400W, re-cut back to 4:3 300W, after exiting the camera, re-enter and become 200W.
Cause Analysis: This version of the design, when you click on the screen scale, the program is to take this scale value as the main attribute, through the sharepreference (write file operation, the file data content is actually a key value pair) to write files, The resolution is used as a secondary property to find the appropriate value through the Find () method, but this resolution is not written into sharepreference, so re-enter or read the original file value.
Modification method:commonrule. java
public void execute () {
Mconditionsetting =Msettinggenerator.getsettingitem (Mconditionkey);
mresultsetting = Msettinggenerator.getsettingitem (string conditionsettingvalue = mconditionsetting.getvalue ();
int index = conditionsatisfied (conditionsettingvalue);
string resultvalue = mresultsetting.getvalue ();
int type = mresultsetting.gettype ();
.......
.......
if (mresultsetting.isenable ()) {
Setresultsettingvalue (type,Resultvalue,Overridevalue,true);
}
if (Mconditionkey.equals (settingconstants.key_picture_ratio)) {
//Add the following code
listpreferencepref =null;
pref =mresultsetting.getlistpreference ();
Sharedpreferences.editoreditor =Pref.getsharedpreferences (settingconstants.key_picture_size).edit ();
Editor.putstring (settingconstants.Key_picture_size,resultvalue);
Editor.apply ();
//Add as above code
return;
}
record record = mresultsetting. new Record ( resultvalue, Overridevalue);
mresultsetting.addoverriderecord ( record);
}
About Android MTK camera L version, after switching the screen scale, the resolution changes, but the original resolution is no longer valid after re-entering the camera