-
Task
-
Resolution: Won't Fix
-
Major
-
None
-
None
-
None
-
None
I make a new class named HS_AppManager in homescreen-service to manage applciations information
and access to application framework(afm-main).The mainly purpose is to make application liked
launcher/homescreen doesn't need to access application framework directly,they only need to interact
with homescreen-service,thus reduce the work of applications.Secondly to manage application status in
homescreen-service.
Now in homescreen-service have two changes,
- add one verb and one event, the verb named "runnables" to get runnables application list;
the event named "app_list_changed" to to notify launcher the runnables application list has changed.
Additional,in the runnables list which homescreen-service send to launcher has checked excpetion applications
liked launcher/homescreen/onscreen application that can't display on launcher.
please refer to runnables sequence. - change tap_shortcut function: when application isn't started,homescreen-service will call "start" verb of
afm-main to start application,by this way when homesceen/launcher start application will only need to
call "tap_shortcut", don't need to pay attention to start application.
please refer to start_application sequence.
Sourcecode path is below:
agl-service-homescreen
anyone can test these two sequence by afb-client-demo used below command:
afb-client-demo --human 'ws://localhost:1045/api?token=HELLO' homescreen subscribe {"event":"app_list_changed"} homescreen runnables homescreen tap_shortcut {"application_id":"poi"}
An Isuue:
When install a service liked "low-can-service@5.99", homescreen-service also can get "application-list-changed" event.
So I must use runnables verb once more to get runnables list, then judge if this installed application
need to change runnables list in HS_AppManger.
IMHO, from the name of this event, it is not appropriate to push event in this scenario, so could afm-main change this event?
If can change it, I only need using "detail" verb to get application details.