Extend 'phone cc set-value' to support bundle-valued carrier config
1. Created new command "set-values-from-xml" to allow setting config
using an XML file that follows AOSP CarrierConfig format from stdin
E.g.
$ cat test.xml
<carrier_config>
<boolean name="inflate_signal_strength_bool" value="true" />
<pbundle_as_map name="opportunistic.5g_data_switch_hysteresis_time_long_bundle">
<long name="48" value="2000" />
<long name="71" value="2000" />
</pbundle_as_map>
</carrier_config>
$ adb shell cmd phone cc set-values-from-xml < test.xml
Previous value:
inflate_signal_strength_bool
BOOLEAN true
New value:
inflate_signal_strength_bool
BOOLEAN true
Previous value:
opportunistic.5g_data_switch_hysteresis_time_long_bundle
PERSISTABLE_BUNDLE PersistableBundle[{}]
New value:
opportunistic.5g_data_switch_hysteresis_time_long_bundle
PERSISTABLE_BUNDLE PersistableBundle[{48=2000, 71=2000}]
2. Update "get-value" to support PersistableBundle type
3. Update "set-value" to notify user to use "set-values-from-xml" when
handling PersistableBundle type config
Test: manual tests
Bug: 222332191
Merged-In: Id26fcbbd11a7486f87e3b034c0badf923c63b8f6
Change-Id: Ie623b4a9fbac92e87218a158a13c072137fc8e4f
1 file changed