提交 eb143374 编写于 作者: L lanxueyuan

change param api

Change-Id: I8cb1714d4ffdbad9c826f58947a01a667dad5632
上级 eed972db
......@@ -271,15 +271,13 @@ void MainAbilitySlice::SetAboutButtonView(void)
buttonView->Add(lablelFontAbout);
char buff[62];
char* gDV = GetDisplayVersion();
const char* gDV = GetDisplayVersion();
int err = sprintf_s(buff, sizeof(buff), "系统版本: %s", gDV);
if (err < 0) {
printf("[ERROR]sprintf_s failed, err = %d\n", err);
free(gDV);
gDV = nullptr;
return;
}
free(gDV);
setAboutTest(buttonView, ABOUT_BUTTON_TEXT_SYSTEM_X, ABOUT_BUTTON_TEXT_SYSTEM_Y, buff);
err = memset_s(buff, sizeof(buff), 0, sizeof(buff));
......@@ -287,15 +285,13 @@ void MainAbilitySlice::SetAboutButtonView(void)
printf("[ERROR]memset_s failed, err = %d\n", err);
return;
}
char* gPT = GetProductType();
const char* gPT = GetDeviceType();
err = sprintf_s(buff, sizeof(buff), "设备名称: %s", gPT);
if (err < 0) {
printf("[ERROR]sprintf_s failed, err = %d\n", err);
free(gPT);
gPT = nullptr;
return;
}
free(gPT);
setAboutTest(buttonView, ABOUT_BUTTON_TEXT_DEVICE_X, ABOUT_BUTTON_TEXT_DEVICE_Y, buff);
UIImageView* imageView = new UIImageView();
......
......@@ -36,7 +36,6 @@ SettingAboutAbilitySlice::~SettingAboutAbilitySlice()
}
for (int count = 0; count < SCROLL_ITEM_NUM; count++) {
if (!itemInfo_[count][1]) {
free(itemInfo_[count][1]);
itemInfo_[count][1] = nullptr;
}
}
......@@ -54,7 +53,7 @@ void SettingAboutAbilitySlice::SetButtonListener()
void SettingAboutAbilitySlice::SetItemInfo()
{
itemInfo_[0][0] = (char*) "设备名称"; // 0
itemInfo_[0][1] = GetProductType(); // 0
itemInfo_[0][1] = GetDeviceType(); // 0
itemInfo_[1][0] = (char*) "厂家信息"; // 1
itemInfo_[1][1] = GetManufacture(); // 1
itemInfo_[2][0] = (char*) "品牌信息"; // 2
......@@ -64,7 +63,7 @@ void SettingAboutAbilitySlice::SetItemInfo()
itemInfo_[4][0] = (char*) "设备序列号"; // 4
itemInfo_[4][1] = GetSerial(); // 4
itemInfo_[5][0] = (char*) "操作系统名"; // 5
itemInfo_[5][1] = GetOsName(); // 5
itemInfo_[5][1] = GetOSFullName(); // 5
itemInfo_[6][0] = (char*) "软件版本号"; // 6
itemInfo_[6][1] = GetDisplayVersion(); // 6
itemInfo_[7][0] = (char*) "BootLoader版本号"; // 7
......
......@@ -58,7 +58,7 @@ private:
RootView* rootView_;
EventListener *buttonBackListener_;
constexpr static int SCROLL_ITEM_NUM = 9;
char *itemInfo_[SCROLL_ITEM_NUM][2];
const char *itemInfo_[SCROLL_ITEM_NUM][2];
constexpr static int ITEM_X = 0;
constexpr static int ITEM_INFO_X = 465;
constexpr static int ITEM_INFO_Y = 36;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册