apps/agl-service-windowmanager-2017.git
5 years agoBug fix: Correct format of app.db sandbox/yuta-d/als2018
Yuta Doi [Tue, 12 Jun 2018 22:11:36 +0000 (07:11 +0900)]
Bug fix: Correct format of app.db

Change-Id: Ia2e2cf47b0966073c97a41ce41ee74b1ad4bcfda
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd layout "system" to layout.db
Yuta Doi [Tue, 12 Jun 2018 21:50:09 +0000 (06:50 +0900)]
Add layout "system" to layout.db

Change-Id: I86fa81e892cefa0273549a8e23b00be59a755e69
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd category "system" for showing specific app on restriction mode ON
Yuta Doi [Tue, 12 Jun 2018 16:37:46 +0000 (01:37 +0900)]
Add category "system" for showing specific app on restriction mode ON

Change-Id: Ic4d63045f98cd18b33876e4cde8d1d0a315706f0
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd role for the application "AlsMeterDemo"
Yuta Doi [Tue, 12 Jun 2018 16:01:59 +0000 (01:01 +0900)]
Add role for the application "AlsMeterDemo"

Change-Id: Ibb740243c172badb3c58c936b181e284f9eec9ac
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBug fix: Add mutex lock
Yuta Doi [Tue, 12 Jun 2018 09:34:49 +0000 (18:34 +0900)]
Bug fix: Add mutex lock

Change-Id: Iaa47eb9577167d57f56657660d278ad420306c62
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBug fix: Refer removed surface id in vector of pending_end_draw
Yuta Doi [Tue, 12 Jun 2018 04:29:23 +0000 (13:29 +0900)]
Bug fix: Refer removed surface id in vector of pending_end_draw

Change-Id: I76d86bb19388334dd640fbe07e8d307dec9b61cc
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBug fix: Calling enqueue_flushdraw is later than emit_syncdraw
Yuta Doi [Tue, 12 Jun 2018 04:08:40 +0000 (13:08 +0900)]
Bug fix: Calling enqueue_flushdraw is later than emit_syncdraw

Change-Id: Idd632363727d7e1f4584d114e958c8689558ec10
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBug fix: convert nullptr to string
Yuta Doi [Fri, 8 Jun 2018 01:28:28 +0000 (10:28 +0900)]
Bug fix: convert nullptr to string

Change-Id: I418de2403730998a6437476e878cd03f4c40cb0d
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd new roles and remove unnecessary role definition
Yuta Doi [Tue, 5 Jun 2018 04:47:25 +0000 (13:47 +0900)]
Add new roles and remove unnecessary role definition

Change-Id: I228ffab3810675789dc9cf90a0e4683466f79b2f
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd the role "launcher"
Yuta Doi [Tue, 5 Jun 2018 04:34:09 +0000 (13:34 +0900)]
Add the role "launcher"

Change-Id: Ied50062946952ccad265e496a038ca3394d9245b
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBug fix: refer the released memory of role name
Yuta Doi [Tue, 5 Jun 2018 04:23:02 +0000 (13:23 +0900)]
Bug fix: refer the released memory of role name

Change-Id: I67aa440a37f8955da2d7daaf1f6ace95016b763d
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoModify request_surface for XDG app
Yuta Doi [Fri, 1 Jun 2018 09:44:35 +0000 (18:44 +0900)]
Modify request_surface for XDG app

Change-Id: I91ac5d09f985e2dda1b0ed6274f01106c87807be
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoModify API of PolicyManager
Yuta Doi [Fri, 1 Jun 2018 05:27:14 +0000 (14:27 +0900)]
Modify API of PolicyManager
and change the process for stopping timer

Change-Id: Id7f9ba1c25adc188b01d8407f7043ea22da113d9
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoUse sd_event_add_defer() for dispatching checkPolicy
Yuta Doi [Thu, 31 May 2018 06:34:38 +0000 (15:34 +0900)]
Use sd_event_add_defer() for dispatching checkPolicy
and modify the format of the logs

Change-Id: Ic6e4a74c03e9fc74277ce4da0d3fd726c81a4a95
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd timer for restriction mode
Yuta Doi [Tue, 29 May 2018 14:14:11 +0000 (23:14 +0900)]
Add timer for restriction mode

When car state is changed stop -> run,
the timer for switching restriction mode off -> on is set.

When car state is changed run -> stop,
restriction mode is changed on -> off.

Change-Id: I6a8af9b45c7631db59cb78c41d07af118346a331
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoPolicyManager uses sd_event loop for the process of check policy
Yuta Doi [Tue, 29 May 2018 08:10:03 +0000 (17:10 +0900)]
PolicyManager uses sd_event loop for the process of check policy

Change-Id: I1e7f7c2085ec30e09a53a67c0ad9c51b2bf53578
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoThe surfaces are managed by using the roles instead of the drawing names
Yuta Doi [Fri, 25 May 2018 08:01:36 +0000 (17:01 +0900)]
The surfaces are managed by using the roles instead of the drawing names

Change-Id: I7373a54f2df334ac223b51a6cb9a643a88e7c33c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoUse afb_service_call instead of afb_service_call_sync
Yuta Doi [Fri, 25 May 2018 05:27:58 +0000 (14:27 +0900)]
Use afb_service_call instead of afb_service_call_sync
because initializing of WindowManager is dispatched
when starting low-can service is late.

Change-Id: I081aeda5dcd2a815467e6d19c51deec63d6303f4
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoAdd new event
Kazumasa Mitsunari [Tue, 22 May 2018 10:42:21 +0000 (19:42 +0900)]
Add new event

Add "screen_updated" event.
This means new application is visible from the user.

key   ... "id"
value ... application_id

Change-Id: I548ba30f882d126d538b44281afa36625a1325e4
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
5 years agoDelete label "role" for the API activateSurface and deactivateSurface
Yuta Doi [Fri, 25 May 2018 02:53:43 +0000 (11:53 +0900)]
Delete label "role" for the API activateSurface and deactivateSurface

Change-Id: Ia59c0f3ad9d44e0836520abc50419d0be006acdf
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoUse $ORIGIN for rpath
Yuta Doi [Thu, 24 May 2018 01:54:46 +0000 (10:54 +0900)]
Use $ORIGIN for rpath

Change-Id: I33e1faa842ce881f56a8734b2463f650510929da
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoVideoPlayer is moved to BG layer when becoming invisible
Yuta Doi [Thu, 24 May 2018 01:46:34 +0000 (10:46 +0900)]
VideoPlayer is moved to BG layer when becoming invisible

Change-Id: Ifff08a2ea793365a303363b4985cdbeb31fbdf24
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBugfix: Restriction app is displayed on Dashboard app when steping on foot brake sandbox/yuta-d/add_api_get_car_info
Yuta Doi [Wed, 23 May 2018 05:03:31 +0000 (14:03 +0900)]
Bugfix: Restriction app is displayed on Dashboard app when steping on foot brake

Change-Id: Ic4b2cd4769abf90c07d2c7e9c7961d3cae40202e
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoBugfix: Occur segmentation fault when steping on the accelerator before navi app...
Yuta Doi [Wed, 23 May 2018 04:34:13 +0000 (13:34 +0900)]
Bugfix: Occur segmentation fault when steping on the accelerator before navi app is started

Change-Id: I5d1218c5eee9001725c14e7f20d05466b073bcfb
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
5 years agoLoads libpolicy_manager.so from the directory where WindowManager is installed
Yuta Doi [Wed, 23 May 2018 04:16:16 +0000 (13:16 +0900)]
Loads libpolicy_manager.so from the directory where WindowManager is installed

Change-Id: Ie581e361323dd267a51f2c6e72807ad712e4dca9
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agogetCarInfo() can get lightstatus.brake status
Yuta Doi [Tue, 22 May 2018 01:21:17 +0000 (10:21 +0900)]
getCarInfo() can get lightstatus.brake status

getCarInfo() can get also the lightstatus brake as follows:
 - lightstatus brake : true/false

The details are described in doc/ApplicationGuide.md
in project apps/agl-service-windowmanager-2017.

Change-Id: I29b2c5b4fe129407c3b304b2fa981cbd3f4b6847
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd lightstatus brake ON/OFF event
Yuta Doi [Mon, 21 May 2018 10:58:50 +0000 (19:58 +0900)]
Add lightstatus brake ON/OFF event

Change-Id: Id2c61fc6e102394f5ba08effe0cfac448b337176
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify the definition of role:phone for ALS
Yuta Doi [Mon, 21 May 2018 07:05:37 +0000 (16:05 +0900)]
Modify the definition of role:phone for ALS

Change-Id: If759a879898e829c73e4ec1a3f3efd1f2a55ff6c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoWaiting for the surface of new app is created before setting the size
Yuta Doi [Mon, 21 May 2018 05:10:05 +0000 (14:10 +0900)]
Waiting for the surface of new app is created before setting the size

Change-Id: I7e60330739388b5b5dc339076f432e6ca77f12b4
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoBug Fix: When restriction app gets invisible event, other app also gets it
Yuta Doi [Mon, 21 May 2018 01:44:38 +0000 (10:44 +0900)]
Bug Fix: When restriction app gets invisible event, other app also gets it

Change-Id: Id72543fa86007bbff7c3e77f7df78e4162bfa269
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd API which can get information about the car state
Yuta Doi [Fri, 18 May 2018 08:16:14 +0000 (17:16 +0900)]
Add API which can get information about the car state

getCarInfo() can get the car state informations as follows:
 - parking brake state        : true/false
 - accelerator pedal position : 0-127.5
 - car state                  : "stop"/"run"

The details are described in doc/ApplicationGuide.md
in project apps/agl-service-windowmanager-2017.

Change-Id: I2a4a06ceeedbd2d3b1188a7fb442e1272e46897b
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoApp (ResourceManager) class has the current car info
Yuta Doi [Thu, 17 May 2018 07:48:33 +0000 (16:48 +0900)]
App (ResourceManager) class has the current car info
and LowCanClient does not check whether CAN signal value is changed

Change-Id: I41dfd0772f8fb4db70c4b5c0caa35791600abc54
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify the policy of restriction
Yuta Doi [Wed, 16 May 2018 07:26:13 +0000 (16:26 +0900)]
Modify the policy of restriction
for when the restricted app becomes invisible.

Change-Id: I7519078844bd90855f69472bce042ce0bd8e52e5
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd transmission gear position event in PolicyManager
Yuta Doi [Mon, 14 May 2018 09:39:23 +0000 (18:39 +0900)]
Add transmission gear position event in PolicyManager

Change-Id: Ibf528b5ab3877d2cf094920fd0723873fb12647c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoPolicyManager can judge the current car state
Yuta Doi [Mon, 14 May 2018 08:22:57 +0000 (17:22 +0900)]
PolicyManager can judge the current car state
and remove judgement process of it from LowCanClient
because it should be judged by PolicyManager

Change-Id: I94467332665e34b751604cafe5d43f3abd4d7cfd
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoChange the policy of switchng car run/stop in dummy stm
Yuta Doi [Mon, 14 May 2018 08:04:28 +0000 (17:04 +0900)]
Change the policy of switchng car run/stop in dummy stm

Change-Id: Ie3770060828f32749e7c47076d901263454e43c2
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd policy of switchng accel pedal status to dummy stm
Yuta Doi [Mon, 14 May 2018 04:10:00 +0000 (13:10 +0900)]
Add policy of switchng accel pedal status to dummy stm

Change-Id: Iea389d3899f2d01430400374ed0ab0f2fe882ec8
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoRemove unnecessary header from policy_manager.hpp
Yuta Doi [Fri, 11 May 2018 09:33:38 +0000 (18:33 +0900)]
Remove unnecessary header from policy_manager.hpp

Change-Id: Ic7135e8ab7ae668c71ea83f5b87df3f741739f28
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoLowCanClient can set filter
Yuta Doi [Fri, 11 May 2018 06:42:29 +0000 (15:42 +0900)]
LowCanClient can set filter

Change-Id: I9464b631a5b36cdfeba28ebd146fce3f5ca7f879
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoLowCanClient can receive accelerator.pedal.position signal
Yuta Doi [Fri, 11 May 2018 04:23:53 +0000 (13:23 +0900)]
LowCanClient can receive accelerator.pedal.position signal

Change-Id: Ia6d4ad7888ec764fcd8dec696f6eda9d826cb62d
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoThe role "video" can be shown in split area for ALS
Yuta Doi [Fri, 11 May 2018 01:09:24 +0000 (10:09 +0900)]
The role "video" can be shown in split area for ALS
and the role "restriction" can use the areas other than "restriction.split.sub"

Change-Id: I5aab163409cf5284b876dc9e44102ee620344472
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoFix switching visibility when deactivating
Yuta Doi [Thu, 10 May 2018 05:57:44 +0000 (14:57 +0900)]
Fix switching visibility when deactivating

commit_change for ivi-wm was not called when deactibating,
therefore added it.

Change-Id: I4558ddaace0f63c6ecbc652d8af29074454decac
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoReplace json_object_from_file to inputJsonFilie
Yuta Doi [Thu, 10 May 2018 05:44:21 +0000 (14:44 +0900)]
Replace json_object_from_file to inputJsonFilie
and remove unnecessary header

Change-Id: Ia4200a9742d62933328d0518731710413caa1a5c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify for restriction role
Yuta Doi [Thu, 10 May 2018 04:10:28 +0000 (13:10 +0900)]
Modify for restriction role

- Add policy for restriction to dummy stm.
- Add the function which inputs json file
  because json_object_from_file can not allows up to only 4KB file.
- Bug fix in json files.
  - Delete unexpected characters.
  - Delete description because it does not follow the format of json array.

Change-Id: I2f8fba1d1001cf244e2531fe3a1a738d5a48091b
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd conversion map role2app
Yuta Doi [Wed, 9 May 2018 08:15:42 +0000 (17:15 +0900)]
Add conversion map role2app

Change-Id: I1e194ecc9fb90ccb4c24e114ac1513ed19f0c0a3
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd policy of switching parking brake state to dummy stm for validation
Yuta Doi [Wed, 9 May 2018 07:09:40 +0000 (16:09 +0900)]
Add policy of switching parking brake state to dummy stm for validation

Change-Id: I547e578526d6ce934c9fa8aa86170cea5a2f17e7
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd parking brake ON/OFF event
Yuta Doi [Wed, 9 May 2018 04:34:19 +0000 (13:34 +0900)]
Add parking brake ON/OFF event

Change-Id: I3b9face35972a275918ac4f95f4a97df035ee924
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify layers.json and layout.db
Kazumasa Mitsunari [Tue, 8 May 2018 09:57:48 +0000 (18:57 +0900)]
Modify layers.json and layout.db

layers.json
* Forgot to change the layer name

layout.db
* Change the name of area and layer
* Modify the size of area

Change-Id: I9edd547419d894aef0142e9ef9668e08987549dc
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoChange the role and layout
Kazumasa Mitsunari [Tue, 8 May 2018 09:12:57 +0000 (18:12 +0900)]
Change the role and layout

role
* upper homescreen -> near_homescreen
* lower homescreen -> far_homescreen
* restriction.* -> restriction

Change-Id: I5d53a66b8dc3d3b9cb761b27b7b388661853fd32
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoChange layout.db
Kazumasa Mitsunari [Tue, 8 May 2018 04:40:53 +0000 (13:40 +0900)]
Change layout.db

* Undo the changes, revert to the original layout.db for test
* Add ALS test case

Change-Id: I8ca89e0455fb0d429d41b2f3a9d3f9341fda551c
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd launcher role to the role.db
Kazumasa Mitsunari [Tue, 8 May 2018 02:04:57 +0000 (11:04 +0900)]
Add launcher role to the role.db

Change-Id: Ibdf275b528678abbfa1771bf0e9ec389c540fbfa
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoChange the size of restriction layer
Kazumasa Mitsunari [Tue, 8 May 2018 02:03:36 +0000 (11:03 +0900)]
Change the size of restriction layer

Change-Id: Ibf2e5f46a95a8c84c7baa513798a685c00e8338d
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd restriction and software keyboard layers
Kazumasa Mitsunari [Mon, 7 May 2018 06:54:36 +0000 (15:54 +0900)]
Add restriction and software keyboard layers

Change-Id: I9133faa840f6feaec3f2b6f88a6e1b33be29639c
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoPackaging with libpolicy_manager.so
Kazumasa Mitsunari [Mon, 7 May 2018 07:41:38 +0000 (16:41 +0900)]
Packaging with libpolicy_manager.so

LD_LIBRARY_PATH is set in ${AFM_APP_INSTALL_DIR}/lib,
so Window Manager can load own library from them.

Change-Id: I5bd62fac6c8661b681a4f617e882548d6da7f336
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd PolicyManager, related classes and some config files
Yuta Doi [Fri, 27 Apr 2018 10:01:36 +0000 (19:01 +0900)]
Add PolicyManager, related classes and some config files

- PolicyManager
    Decide next layout by using occured event and current state
    based on policy table.
    This PolicyManger is reference and the OEMs can replace it.

- LayoutManager
    Change the current layout to the layout
    which decided by PolicyManager.

    NOTE:
    The functions of this class had been included in App class.
    The part of function of this class remain there yet.

- LowCanClient
    Receive the CAN signal from low level CAN service.

- app.db
    Define the applications name and its role.
    This file will be deleted
    when the names and roles can be given by other module.

- layout.cb
    Define the layouts and areas which are included by the layout.

- role.db
    Define the roles of the applications.

Change-Id: I2f84bdf5e68355e022f516cee9a1db88efe58825
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoUpdate document 33/13633/1
Kazumasa Mitsunari [Tue, 27 Feb 2018 01:35:08 +0000 (10:35 +0900)]
Update document

* Change version to 0.5
* Remove code generation. It is not used anymore
* Fix inconsistent spellings
* Add "Fallback" description
* Fix dependency package
* Add description of requestSurfaceXDG

Change-Id: I134c521b0d413780e496e9477c4901431eb72ae5
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoChange reply timing 29/13629/1
Kazumasa Mitsunari [Mon, 19 Mar 2018 08:06:05 +0000 (17:06 +0900)]
Change reply timing

Some events were emitted in a function before it replies.

This patch changes
* The function checks parameter then reply error if it is incorrect.
* After checking parameters, the function continues to process.

The exeption is the syncronous functions such as requestSurface.

Change-Id: I168eba3e2b70d53615a4221bcbbba6bc6096c1db
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoSend visible event after commit change 27/13627/1
Kazumasa Mitsunari [Mon, 19 Mar 2018 10:17:06 +0000 (19:17 +0900)]
Send visible event after commit change

Visible event was emitted before commit change of ivi-controller.
This patch changes the event emitted after commit change.

Bug-AGL: SPEC-1332

Change-Id: Ib8a6d3a513c1fe4a28111b2ad256122289fc5cc0
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoEnable fallback, then display applications 93/13593/3 5.99.1 flounder/5.99.1 flounder_5.99.1
Kazumasa Mitsunari [Fri, 9 Mar 2018 04:45:36 +0000 (13:45 +0900)]
Enable fallback, then display applications

This patch enables the app to show if it is not registered in layers.json.
The original installed app was not shown because the role of app is not
registered in WM as default.

[Patch set2]
Add the same process into requestSurface for RunXDG

Bug-AGL : SPEC-1331

Change-Id: Ie99b971023a95a1924795b1ffc7311a630940b1d
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd APIs which can get information about the display and the surface area 43/12943/2
Yuta Doi [Fri, 22 Dec 2017 12:00:10 +0000 (21:00 +0900)]
Add APIs which can get information about the display and the surface area

getDisplayInfo() can get the display information as follows:
 - width[pixel]
 - height[pixel]
 - width[mm]
 - height[mm]

  NOTE:
    It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display,
    but the value is different with measured value.

    value from wl_output::geometry(): width:320 height:520
    measured value                  : width:193 height:343

getAreaInfo() can get the information of area drawn by the application as follows:
 - x-coordinate
 - y-coordinate
 - width
 - height

The details are described in doc/ApplicationGuide.md.

Bug-AGL: SPEC-1087

Change-Id: I9e6d64ff04e0845b83c69db374d06af17a6d6b66
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoChange the protocol from ivi-controller to ivi-wm 49/13249/5
Yuta Doi [Thu, 11 Jan 2018 02:08:47 +0000 (11:08 +0900)]
Change the protocol from ivi-controller to ivi-wm

This patch is for master branch only.

For using wayland-ivi-extension version 2.x,
the wayland protocol in WindowManager is changed
from ivi-controller to ivi-wm.

NOTE:
If using this patch,
the modification for AGL/meta-agl
which described in SPEC-1244 is necessary.

Bug-AGL: SPEC-1244

Change-Id: I5489db202dfeec8f4626aee53bd1f86c145b95d9
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoFix screen flicker 49/13149/3
Kazumasa Mitsunari [Mon, 8 Jan 2018 07:50:50 +0000 (16:50 +0900)]
Fix screen flicker

If the app is on background layer for CES hack such like Navigation,
when the user push "Home" shortcut botton quickly many times,
the app on background layer appears with flickering.
So fix the issue.

Bug-AGL: SPEC-1247

Change-Id: I777607a99914f0141886e817cb6a5e486f1105f0
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoMerge "Fix build error in gcc 7.2"
Jan-Simon Moeller [Wed, 27 Dec 2017 20:24:20 +0000 (20:24 +0000)]
Merge "Fix build error in gcc 7.2"

6 years agoEnable an application re-launch 31/12931/6
Kazumasa Mitsunari [Fri, 22 Dec 2017 03:28:21 +0000 (12:28 +0900)]
Enable an application re-launch

When an application dies after requestSurface,
the application can't be launched because
Window Manager doesn't know the application is dead and doesn't
clean up its database.

In other case, when Mixer app dies due to pulse audio crash
just before Window Manager handles surface memory,
the connection between weston and Window Manager is dead.

So add following
* Add context setting with window manager clients.
  Terminate the context and clean up WM database
  if a client application is dead.
* Add layout_commit() after add surfaces to layer.

[PatchSet 2]
* Add layout_commit() after add surfaces to layer
  in api_request_surface

Bug-AGL: SPEC-1086

Change-Id: I6ecae2606ac644e49a3383ba849390f8c235f187
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoFix build error in gcc 7.2 55/12955/1
Changhyeok Bae [Fri, 22 Dec 2017 15:46:24 +0000 (15:46 +0000)]
Fix build error in gcc 7.2

error "Never include <bits/signum.h> directly; use <signal.h> instead."

Bug-AGL: SPEC-1181

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
6 years agoEnable to show Video and WebBrowser 45/12945/1
Tadao Tanikawa [Fri, 22 Dec 2017 12:57:44 +0000 (21:57 +0900)]
Enable to show Video and WebBrowser

Adding new applications (Video player and Web browser) to
be managed by window manager properly.

Releated introducing Video player, old name, 'MediaPlayer' for
apps/mediaplayer has been renamed 'Music'.

Old name,'MediaPlayer' keeps alive in layers.json for backward
compatibility.

Change-Id: I2b5e267f4015a4ed128ff5b55ba709faf1914b61
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
6 years agoClean up source code 91/12791/4
Kazumasa Mitsunari [Wed, 20 Dec 2017 07:54:53 +0000 (16:54 +0900)]
Clean up source code

To reduce the files and redundant code,
* Remove afb_binding_api.* files and generate-binding-glue.py.
* Merge them into other source codes.

Change-Id: Ib61350ee6a42d73efc3fa29fa0c4868145a88e2e
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoRemove automatic code generation 11/12711/1
Kazumasa Mitsunari [Tue, 19 Dec 2017 04:35:55 +0000 (13:35 +0900)]
Remove automatic code generation

To handle the request from binder(applications) more flexibly,
we have to remove automatic code generation.

Change-Id: Id14ab749cca68b5aa30376ba3ac543372df87233
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoExclude execusion bit 09/12709/1
Kazumasa Mitsunari [Tue, 19 Dec 2017 04:56:22 +0000 (13:56 +0900)]
Exclude execusion bit

Change-Id: I8eee96305be1c8808442af92b254fce857e3dfd6
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd background layer for CES DEMO 59/12559/1
Yuta Doi [Thu, 14 Dec 2017 06:03:45 +0000 (15:03 +0900)]
Add background layer for CES DEMO

MediaPlayer and Radio can not sound
when their surface have visibility=0.

And Navigation can not be displayed correctly
when the application is switched from visibility=0 to 1.

Because when visibility=0, weston event can not be catched.
So when the applications is not displayed,
they have visibility=1 and are moved to background layer.

Change-Id: Idf236e703a1e74cf564a1b213e6e15fcfa42a29e
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoSupport XDG application 63/12463/1
Tadao Tanikawa [Tue, 12 Dec 2017 12:44:57 +0000 (21:44 +0900)]
Support XDG application

To run XDG application on AGL HomeScreen/WindowManager,
a new binding API of WindowManager is added.

This api is used only by AGL XDG-Launcher and
all xdg applications should be packed as wgt compatible
to AGL Application framework.

Bug-AGL: SPEC-1096

Change-Id: I33dd3b056c736ef374e2251e818541ddd699877b
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
6 years agoRevert "Add APIs which can get information of display and area"
Tadao Tanikawa [Mon, 11 Dec 2017 11:39:21 +0000 (20:39 +0900)]
Revert "Add APIs which can get information of display and area"

This reverts commit 6aaba1066fe89f324d4bae67497f4035fe997d5f.

To fix double posts to Gerrit Review and repository directly.

Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
6 years agoAdd APIs which can get information of display and area 15/12415/1
Yuta Doi [Mon, 11 Dec 2017 02:38:01 +0000 (11:38 +0900)]
Add APIs which can get information of display and area

getDisplayInfo() can get the display information as follows:
 - width[pixel]
 - height[pixel]
 - width[mm]
 - height[mm]

  NOTE:
    It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display,
    but the value is different with measured value.

    value from wl_output::geometry(): width:320 height:520
    measured value                  : width:193 height:343

getAreaInfo() can get the information of area drawn by the application as follows:
 - x-coordinate
 - y-coordinate
 - width
 - height

The details are described in doc/ApplicationGuide.md.

Change-Id: I41eec6251527862ef25d1b84cd37d736d3f9c8aa
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoFix the flipped screen problem 23/12123/2 4.99.3 eel/4.99.3 eel_4.99.3
Kazumasa Mitsunari [Thu, 23 Nov 2017 12:51:56 +0000 (21:51 +0900)]
Fix the flipped screen problem

If transform=flipped-270 is set within weston.ini,
the video output is incorrect.
Fix the problem.

Bug-AGL: SPEC-1115

Change-Id: Idc7117b4b8011e17e888d2237665b485b6ae5621
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoUpdate the debug message macros 91/11891/1
Yuta Doi [Mon, 13 Nov 2017 06:07:25 +0000 (15:07 +0900)]
Update the debug message macros

Update the debug message macros to the latest version
according to https://gerrit.automotivelinux.org/gerrit/#/c/11767/.

Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoRemove and replace the comments 19/11819/2
Yuta Doi [Fri, 10 Nov 2017 08:41:05 +0000 (17:41 +0900)]
Remove and replace the comments

Remove the unnecessary comments
and replace ascii-art comments with doxygen format.

Change-Id: Id1abf56db58070a83f403a1f8280bc9888e7de09
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd the fail-safe process for the configuration file 01/11801/2
Yuta Doi [Fri, 10 Nov 2017 02:42:36 +0000 (11:42 +0900)]
Add the fail-safe process for the configuration file

If the configuration file "layers.json" can not be opened,
windowmanager uses a default layer configuration.

Change-Id: I1b20f385c5e748a90be5e930a1775a6b3a4f39a5
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoFix the error log on windowmanager initialization 69/11769/1
Yuta Doi [Thu, 9 Nov 2017 05:25:57 +0000 (14:25 +0900)]
Fix the error log on windowmanager initialization

Fix the bug which is that windowmanager outputs the error log
on the initialization.

Bug-AGL: SPEC-925

Change-Id: I87b20cc7840ef7241ca56ecab440f52333b1753c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoUpdate the application guide 63/11763/1
Yuta Doi [Thu, 9 Nov 2017 03:02:51 +0000 (12:02 +0900)]
Update the application guide

- Change according to:
  - https://gerrit.automotivelinux.org/gerrit/#/c/11523/
  - https://gerrit.automotivelinux.org/gerrit/#/c/11747/
- Update to the latest information.
- Fix typo.

Change-Id: I6ca0afa91de330219c6fba1c70d20a39282701a2
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoMerge "Add an another example for layout configuration"
Jan-Simon Moeller [Tue, 7 Nov 2017 11:23:53 +0000 (11:23 +0000)]
Merge "Add an another example for layout configuration"

6 years agoAdd an another example for layout configuration 01/11701/1
Kazumasa Mitsunari [Mon, 6 Nov 2017 05:04:31 +0000 (14:04 +0900)]
Add an another example for layout configuration

Add split version configuration.
This sample configuration file enables split layout.
This sample configuration means
"When Navigation app(main_match) is displayed, then
HVAC or MediaPlayer app requests activateSurface,
Window Manager requests to be half size
to HVAC|Mediaplayer and Navigation app".

Change-Id: I685d7165fd43c6f4d964dedb9bf9b5f5a38807f8
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoUpdate application guide 99/11699/1
Yuta Doi [Mon, 6 Nov 2017 00:51:42 +0000 (09:51 +0900)]
Update application guide

Because agl-doc converter doesn't work on current document,
some HTML tags was changed.

Change-Id: Ie04449e9c7c892cda155c180169b75ea02317741
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoFix copyright to TOYOTA 11/11611/3 4.99.2 eel/4.99.2 eel_4.99.2
Kazumasa Mitsunari [Mon, 30 Oct 2017 07:21:53 +0000 (16:21 +0900)]
Fix copyright to TOYOTA

Change-Id: I8ac0463a8efa215477593a96a45f08e38dc46e36
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoChange namespace name to generic name 09/11609/3
Kazumasa Mitsunari [Mon, 30 Oct 2017 06:38:04 +0000 (15:38 +0900)]
Change namespace name to generic name

The name of namespace "genivi" was used.
This is not generic, so changed it to "compositor".

Conflicts:
src/app.cpp

Change-Id: Ie088e5d404e1981f7bc149abbc20e900bea8ec2d
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoAdd LICENSE.MIT 31/11631/2
Kazumasa Mitsunari [Tue, 31 Oct 2017 04:05:25 +0000 (13:05 +0900)]
Add LICENSE.MIT

Window Manager uses json.hpp licensed with MIT,
so we need to add LICENSE file.

Change-Id: Id78d482bd2edc20cbbc420d7795d4e7341305c92
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoUpdate README.md 27/11627/3
Kazumasa Mitsunari [Tue, 31 Oct 2017 02:42:43 +0000 (11:42 +0900)]
Update README.md

Link to http://docs.automotivelinux.org/docs/apis_services/en/dev/

Related change : https://gerrit.automotivelinux.org/gerrit/#/c/11507

Bug-AGL : SPEC-994

Change-Id: Iefaf4d742dc03cb37eb1bbac8514d3fe9e748ea2
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoLayer configuration file is included in widget 23/11523/6
Yuta Doi [Tue, 24 Oct 2017 05:09:38 +0000 (14:09 +0900)]
Layer configuration file is included in widget

Layer configuration file (layers.json) is placed in target
when installation of windowmanager.

Bug-AGL: SPEC-991

Change-Id: Ia614ec400c185ec7db4379c66321363a68e5e0da
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify the waiting loop of the ivi configuration listener 13/11513/5
Yuta Doi [Mon, 23 Oct 2017 14:39:52 +0000 (23:39 +0900)]
Modify the waiting loop of the ivi configuration listener

When layout is NOT normal, wait for the listener.

Change-Id: Iedbb5de7a997c82613a0e1947d91ee2527f28436
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoUpdate the application guide 07/11507/5
Yuta Doi [Mon, 23 Oct 2017 14:32:17 +0000 (23:32 +0900)]
Update the application guide

Update the document table of contents and the api reference
as the libwindowmanager is merged into the application guide.

Bug-AGL: SPEC-994

Change-Id: Ic98f5ac48282878a92074f72961a4531e1b9a0a8
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoAdd debug message macros controlled by environment variable 05/11505/4
Yuta Doi [Mon, 23 Oct 2017 14:17:47 +0000 (23:17 +0900)]
Add debug message macros controlled by environment variable

Add a HMI_DEBUG macro to print debug messages.
It is controlled by the USE_HMI_DEBUG environment variable.

Change-Id: I3bc5bf2f3b0e9f5ee06f340053f29ad36e7d9dbb
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
6 years agoModify event notification from broadcast to subscribe model 81/11481/4
Kazumasa Mitsunari [Mon, 23 Oct 2017 09:26:46 +0000 (18:26 +0900)]
Modify event notification from broadcast to subscribe model

The event notification was implemented using a broadcast model,
change it to a subscription model.

Bug-AGL: SPEC-987

Change-Id: I344a3a73320eb81c3f670736b032f07400bb8f64
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoRemoved redraw_fixer.cpp 79/11479/3
Kazumasa Mitsunari [Mon, 23 Oct 2017 08:52:08 +0000 (17:52 +0900)]
Removed redraw_fixer.cpp

This is not needed anymore
This was used for testing

Change-Id: I0e1621db8a81d5eef3b91af126f748dacfc93ea7
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoMerge "Move scripts to test directory"
Jan-Simon Moeller [Wed, 1 Nov 2017 11:01:18 +0000 (11:01 +0000)]
Merge "Move scripts to test directory"

6 years agoMove scripts to test directory 77/11477/5
Kazumasa Mitsunari [Mon, 23 Oct 2017 08:48:11 +0000 (17:48 +0900)]
Move scripts to test directory

This scripts are not needed anymore
They were used for testing

[Pach Sets 2]
Add tests directory
 After discussing, it became better to leave the test script.
 Then, rename the directory name from "scripts" to "tests".
 Move the test script to "tests" directory.

Change-Id: I072b1087ef4804ae6877bb2c864a94da799141f1
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoMerge "Add drawing_area parameter to API"
Jan-Simon Moeller [Wed, 1 Nov 2017 11:00:08 +0000 (11:00 +0000)]
Merge "Add drawing_area parameter to API"

6 years agoMerge "Provide a json configuration file for the full screen layout"
Jan-Simon Moeller [Wed, 1 Nov 2017 10:55:48 +0000 (10:55 +0000)]
Merge "Provide a json configuration file for the full screen layout"

6 years agoAdd drawing_area parameter to API 73/11473/4
Kazumasa Mitsunari [Mon, 23 Oct 2017 08:31:27 +0000 (17:31 +0900)]
Add drawing_area parameter to API

Add drawing_area parameter in activateSurface API
and syncDraw event.
This is needed for the following feature
 - To request writting area
 - To inform application of writting area

I assume that
"normal.full" is a full size area in application area,
and "split.[main|sub]" is an upper/lower half size area
in application area.

For example, when Navigation app receives syncDraw event
which the label is Navigation, and the area name is
"normal.full", it means Navigation will be displayed
as a full size(in application area).

When Navigation app receives syncDraw event which
the label is same, and the area name is "split.main",
it means Navigation will be displayed
as an upper half size(in application area).
Application must return endDraw after changing its design
according to the size,
when the application receives syncDraw event.

Layout is defined in layers.json file.
Current layout is set to full screen.
Bug-AGL: SPEC-987

Change-Id: I5efed3dda88275e18dc1d951b98bdfcfc79ee46b
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoProvide a json configuration file for the full screen layout 71/11471/4
Kazumasa Mitsunari [Mon, 23 Oct 2017 08:30:21 +0000 (17:30 +0900)]
Provide a json configuration file for the full screen layout

This configuration file is a sample for a full screen layout.

Bug-AGL : SPEC-997

Change-Id: Ib5d5de93ee134c0bdf3ede65b41efee6c5f68413
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
6 years agoMerge "Change the sequence how signals are emitted"
Jan-Simon Moeller [Tue, 31 Oct 2017 15:20:32 +0000 (15:20 +0000)]
Merge "Change the sequence how signals are emitted"

6 years agoChange the sequence how signals are emitted 69/11469/2
Kazumasa Mitsunari [Mon, 23 Oct 2017 08:28:13 +0000 (17:28 +0900)]
Change the sequence how signals are emitted

According to https://wiki.automotivelinux.org/_media/agl-hmi-fw_windowmanager_spec_v0.1.0.pdf,
the visible event is emitted first

Bug-AGL : SPEC-987

Change-Id: I5b5fa669b31b9a5283ccc91702064207a85d838c
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>