Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
石璀亮
/
system_info
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e772c254
authored
Jul 19, 2017
by
石璀亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(SystemSetting):add a unit for operate the hardware api
1 parent
2e64f86f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
4 deletions
app/src/main/java/com/nbbsw/cuiliang/systemsetting/CommonTableActivity.java
app/src/main/java/com/nbbsw/cuiliang/systemsetting/SettingActivity.java
app/src/main/java/com/nbbsw/cuiliang/systemsetting/SystemSetting.java
app/src/main/java/com/nbbsw/cuiliang/systemsetting/CommonTableActivity.java
View file @
e772c25
This diff is collapsed.
Click to expand it.
app/src/main/java/com/nbbsw/cuiliang/systemsetting/SettingActivity.java
View file @
e772c25
...
...
@@ -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
();
...
...
app/src/main/java/com/nbbsw/cuiliang/systemsetting/SystemSetting.java
0 → 100644
View file @
e772c25
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
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment