mirror of
https://github.com/openharmony/applications_sample_camera.git
synced 2026-07-21 00:25:59 -04:00
@@ -38,7 +38,7 @@ public:
|
||||
bool InstallApp(AppInfo* app);
|
||||
bool UnInstallApp(AppInfo* app);
|
||||
bool StartApp(AppInfo* app);
|
||||
static void SetViewGroup(funcClick click, funcLongPress press, ViewGroupPage* arrPage[MAX_VIEWGROUP], int size);
|
||||
static void SetViewGroup(funcClick click, funcLongPress press, ViewGroupPage* viewPage[MAX_VIEWGROUP], int size);
|
||||
|
||||
private:
|
||||
static void MyBundleStateCallback(const uint8_t installType, const uint8_t resultCode, const void* resultMessage,
|
||||
|
||||
@@ -29,10 +29,7 @@ public:
|
||||
~EventListener() override = default;
|
||||
|
||||
EventListener(OnEventFunc onClick, OnEventFunc onLongPress)
|
||||
{
|
||||
onClick_ = std::move(onClick);
|
||||
onLongPress_ = std::move(onLongPress);
|
||||
}
|
||||
: onClick_(std::move(onClick)), onLongPress_(std::move(onLongPress)) {}
|
||||
|
||||
bool OnClick(UIView& view, const ClickEvent& event) override
|
||||
{
|
||||
|
||||
@@ -92,8 +92,6 @@ bool LongPressView::OnClick(UIView& view, const ClickEvent& event)
|
||||
if (currentView == nullptr) {
|
||||
return false;
|
||||
}
|
||||
UILabelButton* lbutt = nullptr;
|
||||
lbutt = static_cast<UILabelButton*>(currentView);
|
||||
RemoveLview();
|
||||
if (currentView == buttUninstall_) {
|
||||
uninstall_(app_);
|
||||
|
||||
@@ -81,10 +81,10 @@ public:
|
||||
void InstallApp(AppInfo* app);
|
||||
void Callback() override
|
||||
{
|
||||
char tmp[TMP_BUF_SIZE] = { 0 };
|
||||
time_t t = time(nullptr);
|
||||
struct tm* st = localtime(&t);
|
||||
if (st != nullptr) {
|
||||
char tmp[TMP_BUF_SIZE] = {0};
|
||||
int ret = sprintf_s(tmp, sizeof(tmp), "%02d : %02d", st->tm_hour, st->tm_min);
|
||||
if (ret != LAUNCHER_PARAMERROR) {
|
||||
lableTitle_->SetText(tmp);
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
explicit TimeWeatherView(UIViewGroup* viewGroup);
|
||||
virtual ~TimeWeatherView();
|
||||
void SetStyle(Style sty);
|
||||
void SetPosion(int16_t width, int16_t height, int16_t x, int16_t y);
|
||||
void SetPosion(int16_t x, int16_t y, int16_t height, int16_t width);
|
||||
void SetUpView();
|
||||
void SetUpTimeView();
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ public:
|
||||
virtual ~ViewGroupPage();
|
||||
void SetMatrix(int16_t rows, int16_t cols);
|
||||
bool AddApp(AppInfo* pAppInfo);
|
||||
bool RemoveApp(const char* appName);
|
||||
bool FindApp(AppInfo* pAppInfo);
|
||||
bool RemoveApp(const char* pAppName);
|
||||
bool FindApp(AppInfo* pApp);
|
||||
void SetScale(double scale);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -117,9 +117,6 @@ void AppAbilitySlice::SetAnAppInfo(const int count, BundleInfo& pBundleInfo)
|
||||
printf("[ERROR]strcpy_s pBundleInfo.bundleName failed, err = %d\n", err);
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < strlen(pBundleInfo.bundleName); i++) {
|
||||
buff[i] = pBundleInfo.bundleName[i];
|
||||
}
|
||||
SetAppButtonListener(pBundleInfo.bundleName);
|
||||
itemView->SetOnClickListener(buttonAppInfoListener_);
|
||||
scrollView_->Add(itemView);
|
||||
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
|
||||
void PermissionInfoList();
|
||||
void SetAppPermissionInfo(int index, PermissionSaved& permissions);
|
||||
char bundleName_[128];
|
||||
char bundleName_[128] = {0};
|
||||
|
||||
};
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -30,10 +30,7 @@ public:
|
||||
~EventListener() override = default;
|
||||
|
||||
EventListener(OnEventFunc onClick, OnEventFunc onLongPress)
|
||||
{
|
||||
onClick_ = std::move(onClick);
|
||||
onLongPress_ = std::move(onLongPress);
|
||||
}
|
||||
: onClick_(std::move(onClick)), onLongPress_(std::move(onLongPress)) {}
|
||||
|
||||
bool OnClick(UIView& view, const ClickEvent &event) override
|
||||
{
|
||||
|
||||
@@ -451,10 +451,9 @@ int InitControlInterface()
|
||||
void* WpaScanThread(void *args)
|
||||
{
|
||||
int mySleep = 2;
|
||||
int ret = 0;
|
||||
sleep(mySleep);
|
||||
if (g_monitorConn == NULL) {
|
||||
ret = InitControlInterface();
|
||||
int ret = InitControlInterface();
|
||||
printf("%s:%d [INFO] InitControlInterface return %d.\n", __FUNCTION__, __LINE__, ret);
|
||||
if (ret == -1) {
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user