/*
* Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ * Copyright (c) 2019 Konsulko Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using std::string;
using std::vector;
+using std::unordered_map;
namespace wm
{
static sd_event_source *g_timer_ev_src = nullptr;
static AppList g_app_list;
static WindowManager *g_context;
+static vector<string> white_list_area_size_change = {
+ "homescreen", "settings"
+};
namespace
{
return -1;
}
- // TODO: application requests by old role,
- // so create role map (old, new)
- // Load old_role.db
- this->loadOldRoleDb();
-
// Store my context for calling callback from PolicyManager
g_context = this;
// Register callback to PolicyManager
this->pmw.registerCallback(onStateTransitioned, onError);
- // Make afb event
- for (int i = Event_Val_Min; i <= Event_Val_Max; i++)
+ // Make afb event for subscriber
+ for (int i = Event_ScreenUpdated; i < Event_Error; i++)
{
- map_afb_event[kListEventName[i]] = afb_daemon_make_event(kListEventName[i].c_str());
+ map_afb_event[kListEventName[i]] = afb_api_make_event(afbBindingV3root, kListEventName[i].c_str());
}
const struct rect css_bg = this->lc->getAreaSize("fullscreen");
double scale = static_cast<double>(dp_bg.height()) / css_bg.h;
this->lc->setupArea(dp_bg, scale);
- this->lc->createLayers();
-
return 0;
}
result<int> WindowManager::api_request_surface(char const *appid, char const *drawing_name)
{
- // TODO: application requests by old role,
- // so convert role old to new
- const char *role = this->convertRoleOldToNew(drawing_name);
+ string str_id = appid;
+ string role = drawing_name;
+ unsigned lid = 0;
- // auto lid = this->layers.get_layer_id(string(role));
- unsigned lid = this->lc->getLayerID(string(role));
- if (lid == 0)
+ if(!g_app_list.contains(str_id))
{
- /**
- * register drawing_name as fallback and make it displayed.
- */
- // lid = this->layers.get_layer_id(string("fallback"));
- lid = this->lc->getLayerID(string("fallback"));
- HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
+ lid = this->generateLayerForClient(role);
if (lid == 0)
{
- return Err<int>("Drawing name does not match any role, fallback is disabled");
+ return Err<int>("Designated role does not match any role, fallback is disabled");
+ }
+ // add client into the db
+ g_app_list.addClient(str_id, lid, role);
+ }
+ else
+ {
+ // This case occurs when an client calls "subscribe" before request_surface.
+ // Then application doesn't have layer and role yet.
+ auto client = g_app_list.lookUpClient(str_id);
+ if(client->layerID() == 0)
+ {
+ client->setLayerID(this->generateLayerForClient(role));
}
+ client->setRole(role);
}
+ // generate surface ID for ivi-shell application
auto rname = this->id_alloc.lookup(role);
if (!rname)
{
// name does not exist yet, allocate surface id...
auto id = int(this->id_alloc.generate_id(role));
- // this->layers.add_surface(id, *lid);
- this->tmp_surface2app[id] = {string(appid), lid};
-
- // add client into the db
- string appid_str(appid);
- g_app_list.addClient(appid_str, lid, id, string(role));
+ this->tmp_surface2app[id] = {str_id, lid};
- // Set role map of (new, old)
- this->rolenew2old[role] = string(drawing_name);
+ auto client = g_app_list.lookUpClient(str_id);
+ client->registerSurface(id);
return Ok<int>(id);
}
char const *WindowManager::api_request_surface(char const *appid, char const *drawing_name,
char const *ivi_id)
{
- // TODO: application requests by old role,
- // so convert role old to new
- const char *role = this->convertRoleOldToNew(drawing_name);
+ string str_id = appid;
+ string role = drawing_name;
unsigned sid = std::stol(ivi_id);
+ HMI_DEBUG("This API(requestSurfaceXDG) is for XDG Application using runXDG");
+ /*
+ * IVI-shell doesn't send surface_size event via ivi-wm protocol
+ * if the application is using XDG surface.
+ * So WM has to set surface size with original size here
+ */
WMError ret = this->lc->setXDGSurfaceOriginSize(sid);
if(ret != SUCCESS)
{
return "fail";
}
- // auto lid = this->layers.get_layer_id(string(role));
- auto lid = this->lc->getLayerID(string(role));
- if (lid == 0)
+ if(!g_app_list.contains(str_id))
{
- /**
- * register drawing_name as fallback and make it displayed.
- */
- lid = this->lc->getLayerID(string("fallback"));
- HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role);
- if (lid == 0)
+ unsigned l_id = this->generateLayerForClient(role);
+ if (l_id == 0)
+ {
+ return "Designated role does not match any role, fallback is disabled";
+ }
+ // add client into the db
+ g_app_list.addClient(str_id, l_id, role);
+ }
+ else
+ {
+ // This case occurs when an client calls "subscribe" before request_surface.
+ // Then application doesn't have layer and role yet.
+ auto client = g_app_list.lookUpClient(str_id);
+ if(client->layerID() == 0)
{
- return "Drawing name does not match any role, fallback is disabled";
+ client->setLayerID(this->generateLayerForClient(role));
}
+ client->setRole(role);
}
auto rname = this->id_alloc.lookup(role);
// register pair drawing_name and ivi_id
this->id_alloc.register_name_id(role, sid);
- this->lc->addSurface(sid, lid);
- HMI_DEBUG("surface_id is %u, layer_id is %u", sid, lid);
-
- // add client into the list
- string appid_str(appid);
- g_app_list.addClient(appid_str, lid, sid, string(role));
-
- // Set role map of (new, old)
- this->rolenew2old[role] = string(drawing_name);
+ auto client = g_app_list.lookUpClient(str_id);
+ client->addSurface(sid);
return nullptr;
}
-void WindowManager::api_activate_surface(char const *appid, char const *drawing_name,
+void WindowManager::api_activate_window(char const *appid, char const *drawing_name,
char const *drawing_area, const reply_func &reply)
{
- // TODO: application requests by old role,
- // so convert role old to new
- const char *c_role = this->convertRoleOldToNew(drawing_name);
-
string id = appid;
- string role = c_role;
+ string role = drawing_name;
string area = drawing_area;
if(!g_app_list.contains(id))
reply("app doesn't request 'requestSurface' or 'setRole' yet");
return;
}
-
auto client = g_app_list.lookUpClient(id);
+
Task task = Task::TASK_ALLOCATE;
unsigned req_num = 0;
WMError ret = WMError::UNKNOWN;
return;
}
- /*
- * Do allocate tasks
- */
+ // Do allocate tasks
ret = this->checkPolicy(req_num);
if (ret != WMError::SUCCESS)
}
}
-void WindowManager::api_deactivate_surface(char const *appid, char const *drawing_name,
+void WindowManager::api_deactivate_window(char const *appid, char const *drawing_name,
const reply_func &reply)
{
- // TODO: application requests by old role,
- // so convert role old to new
- const char *c_role = this->convertRoleOldToNew(drawing_name);
-
- /*
- * Check Phase
- */
+ // Check Phase
string id = appid;
- string role = c_role;
+ string role = drawing_name;
string area = ""; //drawing_area;
Task task = Task::TASK_RELEASE;
unsigned req_num = 0;
return;
}
- /*
- * Do allocate tasks
- */
+ // Do allocate tasks
ret = this->checkPolicy(req_num);
if (ret != WMError::SUCCESS)
void WindowManager::api_enddraw(char const *appid, char const *drawing_name)
{
- // TODO: application requests by old role,
- // so convert role old to new
- const char *c_role = this->convertRoleOldToNew(drawing_name);
-
string id = appid;
- string role = c_role;
+ string role = drawing_name;
unsigned current_req = g_app_list.currentRequestNumber();
bool result = g_app_list.setEndDrawFinished(current_req, id, role);
// Undo state of PolicyManager
this->pmw.undoState();
+ this->lc->undoUpdate();
}
this->emitScreenUpdated(current_req);
HMI_SEQ_INFO(current_req, "Finish request status: %s", errorDescription(ret));
}
}
-int WindowManager::api_subscribe(afb_req req, int event_id)
+json_object* WindowManager::api_get_area_list()
{
- struct afb_event event = this->map_afb_event[kListEventName[event_id]];
- return afb_req_subscribe(req, event);
+ json_object* ret = json_object_new_object();
+ json_object* jarray = json_object_new_array();
+ unordered_map<string, struct rect> area2size = this->lc->getAreaList();
+ for(const auto& area : area2size)
+ {
+ json_object* j = json_object_new_object();
+ json_object_object_add(j, "name", json_object_new_string(area.first.c_str()));
+ json_object* jrect = json_object_new_object();
+ json_object_object_add(jrect, "x", json_object_new_int(area.second.x));
+ json_object_object_add(jrect, "y", json_object_new_int(area.second.y));
+ json_object_object_add(jrect, "w", json_object_new_int(area.second.w));
+ json_object_object_add(jrect, "h", json_object_new_int(area.second.h));
+ json_object_object_add(j, "rect", jrect);
+ json_object_array_add(jarray, j);
+ }
+ json_object_object_add(ret, "areas", jarray);
+ HMI_DEBUG("area_list: %s", json_object_get_string(ret));
+ return ret;
+}
+
+void WindowManager::api_change_area_size(ChangeAreaReq &areas)
+{
+ // Error check
+ areas.dump();
+ auto client = g_app_list.lookUpClient(areas.appname);
+ WMError ret;
+ if(client == nullptr)
+ {
+ HMI_ERROR("Call register your role with setRole or requestSurface");
+ return;
+ }
+ if(std::find(white_list_area_size_change.begin(),
+ white_list_area_size_change.end(), client->role()) == white_list_area_size_change.end())
+ {
+ HMI_ERROR("Application %s which has the role %s is not allowed to change area size", client->appID().c_str(), client->role().c_str());
+ return;
+ }
+
+ // Update
+ ret = this->lc->updateAreaList(areas);
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR("%d : %s", ret, errorDescription(ret));
+ return;
+ }
+ ret = this->lc->getUpdateAreaList(&areas);
+ areas.dump();
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR("%d : %s", ret, errorDescription(ret));
+ return;
+ }
+
+ // Create Action
+ unsigned req_num;
+ bool found = false;
+ ret = this->setRequest(client->appID(), client->role(), "-", Task::TASK_CHANGE_AREA, &req_num); // area is null
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_ERROR(req_num, "%d : %s", ret, errorDescription(ret));
+ return;
+ }
+ for(const auto &update: areas.update_app2area)
+ {
+ // create action
+ auto client = g_app_list.lookUpClient(update.first);
+ if(client == nullptr)
+ {
+ HMI_SEQ_ERROR(req_num, "%s : %s", update.first.c_str(), errorDescription(ret));
+ g_app_list.removeRequest(req_num);
+ this->processNextRequest();
+ return;
+ }
+ ret = g_app_list.setAction(req_num, client, client->role(), update.second, TaskVisible::VISIBLE);
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_SEQ_ERROR(req_num, "Failed to set request");
+ return;
+ }
+ }
+ HMI_SEQ_INFO(req_num, "Area change request");
+ g_app_list.reqDump();
+
+ // Request change size to applications
+ for(const auto &action : g_app_list.getActions(req_num, &found))
+ {
+ struct rect r = this->lc->getAreaSize(action.area);
+ action.client->emitSyncDraw(action.area, r);
+ }
+}
+
+bool WindowManager::api_subscribe(afb_req_t req, EventType event_id)
+{
+ bool ret = false;
+ char* appid = afb_req_get_application_id(req);
+ if(event_id < Event_Val_Min || event_id > Event_Val_Max)
+ {
+ HMI_ERROR("not defined in Window Manager", event_id);
+ free(appid);
+ return ret;
+ }
+ HMI_INFO("%s subscribe %s : %d", appid, kListEventName[event_id].c_str(), event_id);
+ if(event_id == Event_ScreenUpdated)
+ {
+ // Event_ScreenUpdated should be emitted to subscriber
+ afb_event_t event = this->map_afb_event[kListEventName[event_id]];
+ int rc = afb_req_subscribe(req, event);
+ if(rc == 0)
+ {
+ ret = true;
+ }
+ }
+ else if(appid)
+ {
+ string id = appid;
+ if(!g_app_list.contains(id))
+ {
+ g_app_list.addClient(id);
+ }
+ ret = g_app_list.lookUpClient(id)->subscribe(req, kListEventName[event_id]);
+ }
+ else
+ {
+ HMI_ERROR("appid is not set");
+ }
+ free(appid);
+ return ret;
}
result<json_object *> WindowManager::api_get_display_info()
{
HMI_DEBUG("called");
- // TODO: application requests by old role,
- // so convert role old to new
- const char *role = this->convertRoleOldToNew(drawing_name);
+ string role = drawing_name;
// Check drawing name, surface/layer id
auto const &surface_id = this->id_alloc.lookup(role);
return Ok<json_object *>(object);
}
-void WindowManager::send_event(const string& evname, const string& role)
-{
- json_object *j = json_object_new_object();
- json_object_object_add(j, kKeyDrawingName, json_object_new_string(role.c_str()));
-
- int ret = afb_event_push(this->map_afb_event[evname], j);
- if (ret != 0)
- {
- HMI_DEBUG("afb_event_push failed: %m");
- }
-}
-
-void WindowManager::send_event(const string& evname, const string& role, const string& area,
- int x, int y, int w, int h)
-{
- json_object *j_rect = json_object_new_object();
- json_object_object_add(j_rect, kKeyX, json_object_new_int(x));
- json_object_object_add(j_rect, kKeyY, json_object_new_int(y));
- json_object_object_add(j_rect, kKeyWidth, json_object_new_int(w));
- json_object_object_add(j_rect, kKeyHeight, json_object_new_int(h));
-
- json_object *j = json_object_new_object();
- json_object_object_add(j, kKeyDrawingName, json_object_new_string(role.c_str()));
- json_object_object_add(j, kKeyDrawingArea, json_object_new_string(area.c_str()));
- json_object_object_add(j, kKeyDrawingRect, j_rect);
-
- int ret = afb_event_push(this->map_afb_event[evname], j);
- if (ret != 0)
- {
- HMI_DEBUG("afb_event_push failed: %m");
- }
-}
-
/**
* proxied events
*/
// requestSurface
if(this->tmp_surface2app.count(surface_id) != 0)
{
- unsigned layer_id = this->tmp_surface2app[surface_id].layer;
- this->lc->addSurface(surface_id, layer_id);
+ string appid = this->tmp_surface2app[surface_id].appid;
+ auto client = g_app_list.lookUpClient(appid);
+ if(client != nullptr)
+ {
+ WMError ret = client->addSurface(surface_id);
+ HMI_INFO("Add surface %d to \"%s\"", surface_id, appid.c_str());
+ if(ret != WMError::SUCCESS)
+ {
+ HMI_ERROR("Failed to add surface to client %s", client->appID().c_str());
+ }
+ }
this->tmp_surface2app.erase(surface_id);
- HMI_DEBUG("surface_id is %u, layer_id is %u", surface_id, layer_id);
}
}
void WindowManager::removeClient(const string &appid)
{
HMI_DEBUG("Remove clinet %s from list", appid.c_str());
+ auto client = g_app_list.lookUpClient(appid);
+ this->lc->appTerminated(client);
g_app_list.removeClient(appid);
}
if ("" != act.role)
{
bool found;
- auto const &surface_id = this->id_alloc.lookup(act.role.c_str());
+ auto const &surface_id = this->id_alloc.lookup(act.role);
if(surface_id == nullopt)
{
goto proc_remove_request;
}
- string appid = g_app_list.getAppID(*surface_id, act.role, &found);
+ string appid = g_app_list.getAppID(*surface_id, &found);
if (!found)
{
if (TaskVisible::INVISIBLE == act.visible)
this->processNextRequest();
}
-/*
- ******* Private Functions *******
- */
-
-void WindowManager::emit_activated(const string& role)
-{
- this->send_event(kListEventName[Event_Active], role);
-}
-
-void WindowManager::emit_deactivated(const string& role)
-{
- this->send_event(kListEventName[Event_Inactive], role);
-}
-
-void WindowManager::emit_syncdraw(const string& role, char const *area, int x, int y, int w, int h)
-{
- this->send_event(kListEventName[Event_SyncDraw], role, area, x, y, w, h);
-}
-
-void WindowManager::emit_syncdraw(const string &role, const string &area)
-{
- struct rect rect = this->lc->getAreaSize(area);
- this->send_event(kListEventName[Event_SyncDraw],
- role.c_str(), area.c_str(), rect.x, rect.y, rect.w, rect.h);
-}
-
-void WindowManager::emit_flushdraw(const string& role)
+unsigned WindowManager::generateLayerForClient(const string& role)
{
- this->send_event(kListEventName[Event_FlushDraw], role);
-}
+ string l_name;
+ unsigned lid = this->lc->getNewLayerID(role, &l_name);
+ if (lid == 0)
+ {
+ // register drawing_name as fallback and make it displayed.
+ lid = this->lc->getNewLayerID(string("fallback"));
+ HMI_DEBUG("%s is not registered in layers.json, then fallback as normal app", role.c_str());
+ if (lid == 0)
+ {
+ return lid;
+ }
+ }
-void WindowManager::emit_visible(const string& role, bool is_visible)
-{
- this->send_event(is_visible ? kListEventName[Event_Visible] : kListEventName[Event_Invisible], role);
-}
+ // TODO: remote layer name is fixed
+ this->lc->createNewLayer(lid, ("Remote" == l_name));
-void WindowManager::emit_invisible(const string& role)
-{
- return emit_visible(role, false);
+ // add client into the db
+ return lid;
}
-void WindowManager::emit_visible(const string& role) { return emit_visible(role, true); }
-
WMError WindowManager::setRequest(const string& appid, const string &role, const string &area,
Task task, unsigned* req_num)
{
}
string req_area = trigger.area;
- if (trigger.task == Task::TASK_ALLOCATE)
- {
- const char *msg = this->check_surface_exist(trigger.role.c_str());
-
- if (msg)
- {
- HMI_SEQ_ERROR(req_num, msg);
- return ret;
- }
- }
-
// Input event data to PolicyManager
if (0 > this->pmw.setInputEventData(trigger.task, trigger.role, trigger.area))
{
return ret;
}
+ g_app_list.reqDump();
for (const auto &action : actions)
{
if (action.visible == TaskVisible::VISIBLE)
{
sync_draw_happen = true;
-
- // TODO: application requests by old role,
- // so convert role new to old for emitting event
- string old_role = this->rolenew2old[action.role];
-
- this->emit_syncdraw(old_role, action.area);
- /* TODO: emit event for app not subscriber
- if(g_app_list.contains(y.appid))
- g_app_list.lookUpClient(y.appid)->emit_syncdraw(y.role, y.area); */
+ struct rect r = this->lc->getAreaSize(action.area);
+ action.client->emitSyncDraw(action.area, r);
}
}
for (const auto &x : actions)
{
this->lc->visibilityChange(x);
- string old_role = this->rolenew2old[x.role];
- emit_deactivated(old_role.c_str());
- /* if (g_app_list.contains(x.client->appID()))
- {
- auto client = g_app_list.lookUpClient(x.client->appID());
- this->deactivate(client->surfaceID(x.role));
- } */
+ x.client->emitVisible(false);
}
+ this->lc->renderLayers();
ret = WMError::NO_LAYOUT_CHANGE;
}
return ret;
return ret;
}
ret = this->lc->visibilityChange(act);
-
- // Emit active/deactive event
- string old_role = this->rolenew2old[act.role];
- if(act.visible == VISIBLE)
- {
- emit_activated(old_role.c_str());
- }
- else
- {
- emit_deactivated(old_role.c_str());
- }
+ act.client->emitVisible((act.visible == VISIBLE));
if (ret != WMError::SUCCESS)
{
HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
}
}
+ this->lc->renderLayers();
HMI_SEQ_INFO(req_num, "emit flushDraw");
{
if(act_flush.visible == TaskVisible::VISIBLE)
{
- // TODO: application requests by old role,
- // so convert role new to old for emitting event
- string old_role = this->rolenew2old[act_flush.role];
-
- this->emit_flushdraw(old_role.c_str());
+ act_flush.client->emitFlushDraw();
}
}
HMI_SEQ_DEBUG(req_num, "emit screen updated");
bool found = false;
auto actions = g_app_list.getActions(req_num, &found);
+ if (!found)
+ {
+ HMI_SEQ_ERROR(req_num,
+ "Window Manager bug :%s : Action is not set",
+ errorDescription(WMError::NO_ENTRY));
+ return;
+ }
// create json object
json_object *j = json_object_new_object();
int ret = afb_event_push(
this->map_afb_event[kListEventName[Event_ScreenUpdated]], j);
- if (ret != 0)
+ if (ret < 0)
{
HMI_DEBUG("afb_event_push failed: %m");
}
if (g_timer_ev_src == nullptr)
{
// firsttime set into sd_event
- int ret = sd_event_add_time(afb_daemon_get_event_loop(), &g_timer_ev_src,
+ int ret = sd_event_add_time(afb_api_get_event_loop(afbBindingV3root), &g_timer_ev_src,
CLOCK_BOOTTIME, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL, 1, processTimerHandler, this);
if (ret < 0)
{
}
}
-const char* WindowManager::convertRoleOldToNew(char const *old_role)
-{
- const char *new_role = nullptr;
-
- for (auto const &on : this->roleold2new)
- {
- std::regex regex = std::regex(on.first);
- if (std::regex_match(old_role, regex))
- {
- // role is old. So convert to new.
- new_role = on.second.c_str();
- break;
- }
- }
-
- if (nullptr == new_role)
- {
- // role is new or fallback.
- new_role = old_role;
- }
-
- HMI_DEBUG("old:%s -> new:%s", old_role, new_role);
-
- return new_role;
-}
-
-int WindowManager::loadOldRoleDb()
-{
- // Get afm application installed dir
- char const *afm_app_install_dir = getenv("AFM_APP_INSTALL_DIR");
- HMI_DEBUG("afm_app_install_dir:%s", afm_app_install_dir);
-
- string file_name;
- if (!afm_app_install_dir)
- {
- HMI_ERROR("AFM_APP_INSTALL_DIR is not defined");
- }
- else
- {
- file_name = string(afm_app_install_dir) + string("/etc/old_roles.db");
- }
-
- // Load old_role.db
- json_object* json_obj;
- int ret = jh::inputJsonFilie(file_name.c_str(), &json_obj);
- if (0 > ret)
- {
- HMI_ERROR("Could not open old_role.db, so use default old_role information");
- json_obj = json_tokener_parse(kDefaultOldRoleDb);
- }
- HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj));
-
- // Perse apps
- json_object* json_cfg;
- if (!json_object_object_get_ex(json_obj, "old_roles", &json_cfg))
- {
- HMI_ERROR("Parse Error!!");
- return -1;
- }
-
- int len = json_object_array_length(json_cfg);
- HMI_DEBUG("json_cfg len:%d", len);
- HMI_DEBUG("json_cfg dump:%s", json_object_get_string(json_cfg));
-
- for (int i=0; i<len; i++)
- {
- json_object* json_tmp = json_object_array_get_idx(json_cfg, i);
-
- const char* old_role = jh::getStringFromJson(json_tmp, "name");
- if (nullptr == old_role)
- {
- HMI_ERROR("Parse Error!!");
- return -1;
- }
-
- const char* new_role = jh::getStringFromJson(json_tmp, "new");
- if (nullptr == new_role)
- {
- HMI_ERROR("Parse Error!!");
- return -1;
- }
-
- this->roleold2new[old_role] = string(new_role);
- }
-
- // Check
- for(auto itr = this->roleold2new.begin();
- itr != this->roleold2new.end(); ++itr)
- {
- HMI_DEBUG(">>> role old:%s new:%s",
- itr->first.c_str(), itr->second.c_str());
- }
-
- // Release json_object
- json_object_put(json_obj);
-
- return 0;
-}
-
-const char *WindowManager::check_surface_exist(const char *drawing_name)
-{
- auto const &surface_id = this->id_alloc.lookup(drawing_name);
- if (!surface_id)
- {
- return "Surface does not exist";
- }
- return nullptr;
-}
-
-const char* WindowManager::kDefaultOldRoleDb = "{ \
- \"old_roles\": [ \
- { \
- \"name\": \"HomeScreen\", \
- \"new\": \"homescreen\" \
- }, \
- { \
- \"name\": \"Music\", \
- \"new\": \"music\" \
- }, \
- { \
- \"name\": \"MediaPlayer\", \
- \"new\": \"music\" \
- }, \
- { \
- \"name\": \"Video\", \
- \"new\": \"video\" \
- }, \
- { \
- \"name\": \"VideoPlayer\", \
- \"new\": \"video\" \
- }, \
- { \
- \"name\": \"WebBrowser\", \
- \"new\": \"browser\" \
- }, \
- { \
- \"name\": \"Radio\", \
- \"new\": \"radio\" \
- }, \
- { \
- \"name\": \"Phone\", \
- \"new\": \"phone\" \
- }, \
- { \
- \"name\": \"Navigation\", \
- \"new\": \"map\" \
- }, \
- { \
- \"name\": \"HVAC\", \
- \"new\": \"hvac\" \
- }, \
- { \
- \"name\": \"Settings\", \
- \"new\": \"settings\" \
- }, \
- { \
- \"name\": \"Dashboard\", \
- \"new\": \"dashboard\" \
- }, \
- { \
- \"name\": \"POI\", \
- \"new\": \"poi\" \
- }, \
- { \
- \"name\": \"Mixer\", \
- \"new\": \"mixer\" \
- }, \
- { \
- \"name\": \"Restriction\", \
- \"new\": \"restriction\" \
- }, \
- { \
- \"name\": \"^OnScreen.*\", \
- \"new\": \"on_screen\" \
- } \
- ] \
-}";
-
} // namespace wm