8 Commits

Author SHA1 Message Date
Ryan Mitchell
52e1f7a1ba Run idmap2 static-checks and fix formatting issues
Bug: 130324774
Test: builds
Change-Id: I2cf9d3aa268ffe38e525fadee9d81fc6aefe19b1
2019-04-15 08:48:10 -07:00
Mårten Kongstad
0c6ff1da4f idmap2: move commands to Result<Unit>
Change the signature of the idmap2 commands (Create, Dump, ...) to
return Result<Unit> instead of bool. This removes the need to pass in an
ostream for error messages: instead, those messages are part of the
returned Result.

Consolidate error messages: texts in Error objects should not be
prefixed with "error:", that is the responsibility of the outer-most
caller (i.e. main()).

Test: make idmap2_tests
Change-Id: I074881b3d1982ea8f4be5752161ac74b14fcba95
2019-03-19 14:26:38 -07:00
Mårten Kongstad
d10d06d0b0 Add enforcement of idmap policies
Teaches idmap2 to recognize policy restrictions put on overlayable
resources. If overlayable enforcement is turned on for an overlay, then
any resources defined within the overlayable api of the target will have
policy restrictions imposed on them. All resources without overlayable
definitions will continue to be overlayable without policy restrictions.

Bug: 119390857
Test: atest idmap2 and booting

Co-authored-by: Ryan Mitchell <rtmitchell@google.com>
Change-Id: I7e435648eb6e4a87b0b90a7b2a0c3f33c1516ea6
2019-01-16 11:47:24 -08:00
Mårten Kongstad
0eba72a4dd idmap2: fix clang-tidy warnings [modernize-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I8768169fb7b541eb6b1aa3311c46a710eb71aac9
2018-12-21 08:16:09 -08:00
TreeHugger Robot
0b83fbf20e Merge "idmap2: fix clang-tidy warnings [readability-*]" 2018-12-21 05:34:52 +00:00
Mårten Kongstad
cf28136041 idmap2: fix clang-tidy warnings [misc-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I48c1cf25d2f1cf243dca67ec9d7e8fd50e6f9f32
2018-12-20 15:30:49 -08:00
Mårten Kongstad
b877902199 idmap2: fix clang-tidy warnings [readability-*]
Bug: 120024673
Test: mmm frameworks/base/cmds/idmap2; check output
Change-Id: I1565afac8d34e4347d8c946228d1134211e8b435
2018-12-20 15:29:06 -08:00
Mårten Kongstad
0275123eef idmap2: initial code drop
idmap2 is a reboot of the idmap project. The project aims to

  - use modern C++
  - greatly improve test and debug support
  - interface towards AssetManager2 (instead of AssetManager)
  - provide a solid foundation to add support for new features

To make it easier to verify correctness, this first version of idmap2 is
feature equivalent to idmap. Later versions will add support for new
features such as <overlayable>.

Bug: 78815803
Test: make idmap2_tests
Change-Id: I1d806dc875a493e730ab55d2fdb027618e586d16
2018-10-30 04:37:41 -07:00