Commit e772c254 by 石璀亮

refactor(SystemSetting):add a unit for operate the hardware api

1 parent 2e64f86f
......@@ -49,14 +49,14 @@ public class SettingActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Setting: Restore True Value
SystemSetting.restoreSettingTrue();
}
}).
setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Setting: Cancel
// TODO Setting: Cancel restoreSettingTrue
}
}).
create();
......@@ -72,14 +72,14 @@ public class SettingActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Setting: Factory Default
SystemSetting.resetSetting();
}
}).
setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Setting: Cancel
// TODO Setting: Cancel resetSetting
}
}).
create();
......
package com.nbbsw.cuiliang.systemsetting;
import android.util.Log;
/**
* Created by st on 17-7-19.
* Function: Operate the System hardware setting.
*/
public class SystemSetting {
protected static void handleOtherStatus(String[] data) {
// TODO: Other setting
}
protected static void handleCameraStatus(String[] data) {
// TODO: Camera setting
}
protected static void handleScreenStatus(String[] data) {
// TODO: Screen setting
}
protected static void handleStorageStatus(String[] data) {
// TODO: Storage setting
}
protected static void handleMemStatus(String[] data) {
// TODO: Memory setting
}
protected static void handleCpuStatus(String[] data){
systemSet("cpu_type", data[1]);
systemSet("cpu_core", data[2]);
// TODO: CPU setting
}
public static void restoreSettingTrue() {
// TODO Setting: Restore True Value
}
public static void resetSetting() {
// TODO Setting: Factory Default
}
private static void systemSet(String item, String value) {
Log.d("SystemSetting", item + "=" + value);
// TODO: System setting For each hardware
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!