Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Support list attribute nullable/optionals #11704

Merged
merged 2 commits into from
Nov 12, 2021

Conversation

austinh0
Copy link
Contributor

Problem

  • Nullable / optional support doesn't exist in Android clusters code

Change overview

  • Process nullables and optionals in list attributes.
    • DataModel::Nullable -> @Nullable, and null is passed to the Java layer when needed
    • chip::Optional -> java.util.Optional, and if a DataModel::Nullable wrapped by chip::Optional is null, an empty java.util.Optional is used.

Testing

  • Manual test using TestCluster

@github-actions
Copy link

github-actions bot commented Nov 12, 2021

PR #11704: Size comparison from 14eaa07 to 32065a8

Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 14eaa07 32065a8 change % change
efr32 lighting-app BRD4161A (read only) 745392 745392 0 0.0
(read/write) 115764 115764 0 0.0
.bss 113980 113980 0 0.0
.data 1784 1784 0 0.0
.text 745384 745384 0 0.0
BRD4161A+rpc (read only) 732916 732916 0 0.0
(read/write) 132392 132392 0 0.0
.bss 130484 130484 0 0.0
.data 1908 1908 0 0.0
.text 732908 732908 0 0.0
lock-app BRD4161A (read only) 722208 722208 0 0.0
(read/write) 113548 113548 0 0.0
.bss 111804 111804 0 0.0
.data 1740 1740 0 0.0
.text 722200 722200 0 0.0
window-app BRD4161A (read only) 723136 723136 0 0.0
(read/write) 113868 113868 0 0.0
.bss 112124 112124 0 0.0
.data 1744 1744 0 0.0
.text 723128 723128 0 0.0
esp32 all-clusters-app c3devkit (read only) 821900 821900 0 0.0
(read/write) 1221938 1221938 0 0.0
.dram0.bss 55832 55832 0 0.0
.dram0.data 14092 14092 0 0.0
.flash.rodata 166760 166760 0 0.0
.flash.text 821900 821900 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 892991 892991 0 0.0
(read/write) 420112 420112 0 0.0
.dram0.bss 60920 60920 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 193812 193812 0 0.0
.flash.text 887607 887607 0 0.0
.iram0.text 122987 122987 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700508 700508 0 0.0
.bss 77476 77476 0 0.0
.data 1908 1908 0 0.0
.text 615324 615324 0 0.0
lock-app k32w061+debug (read/write) 591728 591728 0 0.0
.bss 67996 67996 0 0.0
.data 1876 1876 0 0.0
.text 516056 516056 0 0.0
shell k32w061+debug (read/write) 657408 657408 0 0.0
.bss 78788 78788 0 0.0
.data 1844 1844 0 0.0
.text 570976 570976 0 0.0
linux all-clusters-app debug (read only) 1701033 1701033 0 0.0
(read/write) 125856 125856 0 0.0
.bss 57328 57328 0 0.0
.data 1010 1010 0 0.0
.data.rel.ro 62256 62256 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139477 139477 0 0.0
.text 1428066 1428066 0 0.0
bridge-app debug+rpc (read only) 1300629 1300629 0 0.0
(read/write) 77264 77264 0 0.0
.bss 42800 42800 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27928 27928 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111252 111252 0 0.0
.text 1092933 1092933 0 0.0
chip-tool debug (read only) 4556205 4556205 0 0.0
(read/write) 163688 163688 0 0.0
.bss 41096 41096 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 114864 114864 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 258122 258122 0 0.0
.text 3997317 3997317 0 0.0
lighting-app debug+rpc (read only) 1567289 1567289 0 0.0
(read/write) 109936 109936 0 0.0
.bss 47984 47984 0 0.0
.data 1202 1202 0 0.0
.data.rel.ro 55456 55456 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129169 129169 0 0.0
.text 1303890 1303890 0 0.0
ota-provider-app debug (read only) 1260345 1260345 0 0.0
(read/write) 75048 75048 0 0.0
.bss 44416 44416 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24776 24776 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112839 112839 0 0.0
.text 1050706 1050706 0 0.0
ota-requestor-app debug (read only) 1345129 1345129 0 0.0
(read/write) 78816 78816 0 0.0
.bss 46880 46880 0 0.0
.data 816 816 0 0.0
.data.rel.ro 26040 26040 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 123664 123664 0 0.0
.text 1122114 1122114 0 0.0
shell debug (read only) 788905 788905 0 0.0
(read/write) 65064 65064 0 0.0
.bss 23400 23400 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36928 36928 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77839 77839 0 0.0
.text 609170 609170 0 0.0
tv-app debug (read only) 1845017 1845017 0 0.0
(read/write) 407672 407672 0 0.0
.bss 339656 339656 0 0.0
.data 2736 2736 0 0.0
.data.rel.ro 59632 59632 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 156173 156173 0 0.0
.text 1544370 1544370 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2289352 2289352 0 0.0
.bss 179412 179412 0 0.0
.data 5216 5216 0 0.0
.heap 851816 851816 0 0.0
.text 1251952 1251952 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2272824 2272824 0 0.0
.bss 172524 172524 0 0.0
.data 5576 5576 0 0.0
.heap 858344 858344 0 0.0
.text 1235424 1235424 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2248448 2248448 0 0.0
.bss 171404 171404 0 0.0
.data 5568 5568 0 0.0
.heap 859472 859472 0 0.0
.text 1211048 1211048 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048376 2048376 0 0.0
.bss 155912 155912 0 0.0
.data 4968 4968 0 0.0
.heap 875568 875568 0 0.0
.text 1010976 1010976 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863015 863015 0 0.0
bss 110932 110932 0 0.0
rodata 96888 96888 0 0.0
text 579568 579568 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 825391 825391 0 0.0
bss 107284 107284 0 0.0
rodata 88080 88080 0 0.0
text 553740 553740 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788058 788058 0 0.0
bss 112304 112304 0 0.0
rodata 92148 92148 0 0.0
text 509036 509036 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838235 838235 0 0.0
bss 109956 109956 0 0.0
rodata 92956 92956 0 0.0
text 559868 559868 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763546 763546 0 0.0
bss 111368 111368 0 0.0
rodata 88260 88260 0 0.0
text 489428 489428 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844327 844327 0 0.0
bss 110096 110096 0 0.0
rodata 94664 94664 0 0.0
text 564032 564032 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838087 838087 0 0.0
bss 109992 109992 0 0.0
rodata 92952 92952 0 0.0
text 559604 559604 0 0.0
shell nrf52840dk_nrf52840 (read/write) 775483 775483 0 0.0
bss 108736 108736 0 0.0
rodata 72160 72160 0 0.0
text 520008 520008 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 690538 690538 0 0.0
bss 109720 109720 0 0.0
rodata 66804 66804 0 0.0
text 440616 440616 0 0.0
p6 all-clusters-app default (read/write) 2297296 2297296 0 0.0
.bss 112416 112416 0 0.0
.data 2520 2520 0 0.0
.heap 918408 918408 0 0.0
.text 1255560 1255560 0 0.0
lock-app default (read/write) 2211896 2211896 0 0.0
.bss 101264 101264 0 0.0
.data 2400 2400 0 0.0
.heap 929680 929680 0 0.0
.text 1170160 1170160 0 0.0
qpg lighting-app qpg6100+debug (read only) 492324 492324 0 0.0
(read/write) 114144 114144 0 0.0
.bss 50624 50624 0 0.0
.data 1008 1008 0 0.0
.text 487004 487004 0 0.0
lock-app qpg6100+debug (read only) 467060 467060 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49560 49560 0 0.0
.data 964 964 0 0.0
.text 461740 461740 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 665202 665202 0 0.0
bss 69304 69304 0 0.0
noinit 33216 33216 0 0.0
text 460046 460046 0 0.0

@github-actions
Copy link

github-actions bot commented Nov 12, 2021

PR #11704: Size comparison from 2d0eb94 to 03d0952

Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2d0eb94 03d0952 change % change
efr32 lighting-app BRD4161A (read only) 745504 745504 0 0.0
(read/write) 115764 115764 0 0.0
.bss 113980 113980 0 0.0
.data 1784 1784 0 0.0
.text 745496 745496 0 0.0
BRD4161A+rpc (read only) 733028 733028 0 0.0
(read/write) 132392 132392 0 0.0
.bss 130484 130484 0 0.0
.data 1908 1908 0 0.0
.text 733020 733020 0 0.0
lock-app BRD4161A (read only) 722320 722320 0 0.0
(read/write) 113548 113548 0 0.0
.bss 111804 111804 0 0.0
.data 1740 1740 0 0.0
.text 722312 722312 0 0.0
window-app BRD4161A (read only) 723232 723232 0 0.0
(read/write) 113868 113868 0 0.0
.bss 112124 112124 0 0.0
.data 1744 1744 0 0.0
.text 723224 723224 0 0.0
esp32 all-clusters-app c3devkit (read only) 822644 822644 0 0.0
(read/write) 1222138 1222138 0 0.0
.dram0.bss 56000 56000 0 0.0
.dram0.data 14092 14092 0 0.0
.flash.rodata 166800 166800 0 0.0
.flash.text 822644 822644 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 893683 893683 0 0.0
(read/write) 420320 420320 0 0.0
.dram0.bss 61088 61088 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 193852 193852 0 0.0
.flash.text 888299 888299 0 0.0
.iram0.text 122987 122987 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700600 700600 0 0.0
.bss 77476 77476 0 0.0
.data 1908 1908 0 0.0
.text 615416 615416 0 0.0
lock-app k32w061+debug (read/write) 591820 591820 0 0.0
.bss 67996 67996 0 0.0
.data 1876 1876 0 0.0
.text 516148 516148 0 0.0
shell k32w061+debug (read/write) 657500 657500 0 0.0
.bss 78788 78788 0 0.0
.data 1844 1844 0 0.0
.text 571068 571068 0 0.0
linux all-clusters-app debug (read only) 1707201 1707201 0 0.0
(read/write) 126176 126176 0 0.0
.bss 57584 57584 0 0.0
.data 1010 1010 0 0.0
.data.rel.ro 62304 62304 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139669 139669 0 0.0
.text 1433778 1433778 0 0.0
bridge-app debug+rpc (read only) 1301269 1301269 0 0.0
(read/write) 77328 77328 0 0.0
.bss 42800 42800 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27992 27992 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111348 111348 0 0.0
.text 1093285 1093285 0 0.0
chip-tool debug (read only) 4576237 4576237 0 0.0
(read/write) 163688 163688 0 0.0
.bss 41096 41096 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 114864 114864 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 258666 258666 0 0.0
.text 4016805 4016805 0 0.0
lighting-app debug+rpc (read only) 1567945 1567945 0 0.0
(read/write) 110032 110032 0 0.0
.bss 47984 47984 0 0.0
.data 1202 1202 0 0.0
.data.rel.ro 55552 55552 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129265 129265 0 0.0
.text 1304258 1304258 0 0.0
ota-provider-app debug (read only) 1260745 1260745 0 0.0
(read/write) 75080 75080 0 0.0
.bss 44416 44416 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24808 24808 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112839 112839 0 0.0
.text 1051058 1051058 0 0.0
ota-requestor-app debug (read only) 1345529 1345529 0 0.0
(read/write) 78848 78848 0 0.0
.bss 46880 46880 0 0.0
.data 816 816 0 0.0
.data.rel.ro 26056 26056 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 123664 123664 0 0.0
.text 1122466 1122466 0 0.0
shell debug (read only) 788905 788905 0 0.0
(read/write) 65064 65064 0 0.0
.bss 23400 23400 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36928 36928 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77839 77839 0 0.0
.text 609170 609170 0 0.0
tv-app debug (read only) 1845913 1845913 0 0.0
(read/write) 407768 407768 0 0.0
.bss 339656 339656 0 0.0
.data 2736 2736 0 0.0
.data.rel.ro 59728 59728 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 156365 156365 0 0.0
.text 1544738 1544738 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290096 2290096 0 0.0
.bss 179580 179580 0 0.0
.data 5216 5216 0 0.0
.heap 851648 851648 0 0.0
.text 1252696 1252696 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2272912 2272912 0 0.0
.bss 172524 172524 0 0.0
.data 5576 5576 0 0.0
.heap 858344 858344 0 0.0
.text 1235512 1235512 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2248544 2248544 0 0.0
.bss 171404 171404 0 0.0
.data 5568 5568 0 0.0
.heap 859472 859472 0 0.0
.text 1211144 1211144 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048376 2048376 0 0.0
.bss 155912 155912 0 0.0
.data 4968 4968 0 0.0
.heap 875568 875568 0 0.0
.text 1010976 1010976 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863095 863095 0 0.0
bss 110932 110932 0 0.0
rodata 96920 96920 0 0.0
text 579628 579628 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 825487 825487 0 0.0
bss 107284 107284 0 0.0
rodata 88112 88112 0 0.0
text 553800 553800 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788154 788154 0 0.0
bss 112304 112304 0 0.0
rodata 92180 92180 0 0.0
text 509096 509096 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838331 838331 0 0.0
bss 109956 109956 0 0.0
rodata 92988 92988 0 0.0
text 559928 559928 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763626 763626 0 0.0
bss 111368 111368 0 0.0
rodata 88292 88292 0 0.0
text 489488 489488 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844423 844423 0 0.0
bss 110096 110096 0 0.0
rodata 94696 94696 0 0.0
text 564092 564092 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838183 838183 0 0.0
bss 109992 109992 0 0.0
rodata 92984 92984 0 0.0
text 559664 559664 0 0.0
shell nrf52840dk_nrf52840 (read/write) 775483 775483 0 0.0
bss 108736 108736 0 0.0
rodata 72160 72160 0 0.0
text 520008 520008 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 690538 690538 0 0.0
bss 109720 109720 0 0.0
rodata 66804 66804 0 0.0
text 440616 440616 0 0.0
p6 all-clusters-app default (read/write) 2298176 2298176 0 0.0
.bss 112576 112576 0 0.0
.data 2520 2520 0 0.0
.heap 918248 918248 0 0.0
.text 1256440 1256440 0 0.0
lock-app default (read/write) 2212008 2212008 0 0.0
.bss 101264 101264 0 0.0
.data 2400 2400 0 0.0
.heap 929680 929680 0 0.0
.text 1170272 1170272 0 0.0
qpg lighting-app qpg6100+debug (read only) 492416 492416 0 0.0
(read/write) 114144 114144 0 0.0
.bss 50624 50624 0 0.0
.data 1008 1008 0 0.0
.text 487096 487096 0 0.0
lock-app qpg6100+debug (read only) 467152 467152 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49560 49560 0 0.0
.data 964 964 0 0.0
.text 461832 461832 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 665286 665286 0 0.0
bss 69304 69304 0 0.0
noinit 33216 33216 0 0.0
text 460104 460104 0 0.0

Copy link
Contributor

@chulspro chulspro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ~ Looks good to me.

@andy31415 andy31415 merged commit 909206e into project-chip:master Nov 12, 2021
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
* Support nullable/optionals in list attribute callbacks

* Regenerate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants