if (oldPid != pid)
{
oldPid = pid;
+ char pkgname[255] = {0, };
+ if ((AUL_R_OK != aul_app_get_pkgname_bypid(pid, pkgname, 255)) || pkgname[0] == 0)
+ {
+ SysSecureLog(NID_APP, "Failed to get the package name from pid=%x pAppName=%s", pid, pAppName ? pAppName : "null");
+ return;
+ }
+ AppId appId(_Aul::GetRealAppId(String(pkgname)));
+
std::unique_ptr<IEnumeratorT<Tizen::App::IActiveAppEventListener* > > pEnum(__activeAppEventListenerList.GetEnumeratorN());
if (pEnum.get())
{
pEnum->GetCurrent(pListener);
if (pListener)
{
- char pkgname[255] = {0, };
- aul_app_get_pkgname_bypid(pid, pkgname, 255);
- // TODO: Translate it to package name --> AppId
- pListener->OnActiveAppChanged(AppId(pkgname));
+ pListener->OnActiveAppChanged(appId);
}
}
}