Change to getSystemService(Class<T>) to align the capability with framework
part.
Bug: 179640862
Test: local
Change-Id: I1b4812044fc4876bec6645570049a60f9470dbbd
With current code logic, whenever user changing
mvno type, it only updates mvno data field text,
but the summary is not get updated.
For example, there is an apn configured as mvno
type 'GID' and mvno data 'FF', and user changes
mvno type to:
1. 'none' then save, the APN is saved with mvno
type 'none' and mvno data 'FF' while it is
better to save mvno data as empty value.
2. 'imsi', although the APN can be saved with mvno
type 'imsi' and mvno data 'mcc + mnc + x',
the UI still display mvno data field as 'FF'
unchanged(until user edit mvno data then save)
while the mvno data text is already changed to
'mcc + mnc + x'. It is better to also update
mvno data summary as 'mcc + mnc + x'
With current patch, either adding new apn or edit
exist apn, the mvno data field summary is always
consistent with latest mvno data field text, which
won't make user feel confused.
Test: Build and manual test on device.
Change-Id: Ica72e246296c20a6d20283b315e6e6c46e80ac08
Signed-off-by: Wei Huang <hwbest.v@gmail.com>
Signed-off-by: Honggang Luo <luo.loky@gmail.com>
Signed-off-by: Chao Yuan <chaoyuanx@gmail.com>
- Edittext on edittextpreference
- Summary on edittextpreference
Bug: 142440775
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ApnEditorTest -j
Test: Sanity test pass with customized carrier data
- data in summary and text of edittext preference correctly correctly
display on.
Change-Id: I3162de19659df79c5873c730d7d32e4ed998bcbe
ApnEditor tries read and set the UI in onCreate, before the previous
bundle is restored. This caused problems when the configuration has
changed (such as switching to Dark Theme).
This moves the UI changes to onViewRestored
Fixes: 146399432
Test: make SettingsGoogle and manual test UI
Change-Id: I8147ec96569fa28867c088d6c36584aa344f40ed
Merged-In: I8147ec96569fa28867c088d6c36584aa344f40ed
ApnEditor tries read and set the UI in onCreate, before the previous bundle
is restored. This caused problems when the configuration has changed (such
as switching to Dark Theme).
This moves the UI changes to onViewRestored
Fixes: 146399432
Test: make SettingsGoogle and manual test UI
Change-Id: I8147ec96569fa28867c088d6c36584aa344f40ed
Add default value on APN (roaming) protocol based on configuration when user leave it empty during editing APN.
Bug: 142440775
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ApnEditorTest
Change-Id: I3f1ca0ef17ceaaf2a94b21b6034cd74e56081b61
Copy constants to ApnEditor from PhoneConstant
Test: make
Test: m RunSettingsRoboTests
Change-Id: Idb26ded937dd31f08c96323d5064947a6af86156
Merged-In: I22b85799ad547aca1ce4e63af3f39bc7f29618c6
Replace getSimOperator() by having SubscriptionInfo
from ProxySubscriptionManager#getActiveSubscriptionInfo().
Bug: 144263441
Test: Manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ApnEditorTest
Change-Id: I132b352dfb50a9cd3a2ddd21b347177ac0332740
Merged-In: I25cc9dc0912564b8d6f8b23b53f3eb20a51eea32
Replace getSimOperator() by having SubscriptionInfo
from getAccessibleSubscriptionInfo().
Bug: 144263441
Test: Manual
make RunSettingsRoboTests -j ROBOTEST_FILTER=ApnEditorTest
Change-Id: I25cc9dc0912564b8d6f8b23b53f3eb20a51eea32
Original behavior will map all APN type if enter empty APN type. But it
sometimes cause problem that MMS or IMS not working when select to this
custom APN. So if the user doesn't enter any APN type, just map to
valure of carrier config 'apn_settings_default_apn_types_string_array'
to avoid all the functions broken.
Bug: 129704611
Test: 1.Enter empty APN type and check if only default is added into
APN. 2.atest ApnEditorTest pass.
Change-Id: Icec274e5b402af06822479bcc60294b347f5254f
Considers subId when reading carrier config values
KEY_READ_ONLY_APN_TYPES_STRING_ARRAY and
KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY.
This ensures that the APN will be editable or non-editable correctly
when using dual sim.
Bug: 112929355
Test: Manual
Change-Id: I2186dd5e1f71ca5361309a7314f84cf4fa2d3937
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This CL only changed AlertDialog imports.
So, reviewer can review it easily.
Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
Also remove the duplicate ic_menu_delete.xml and fix up places where it
was used.
Bug: 77982107
Test: manual
Change-Id: I23ede37b7cdf9bea59b44cd0f817bf0ad0cd1d69
This root caused is that we closed the managed cursor which lifecycle is
managed by Activity.
Actually, we don't need the managed cursor in this case, just use the
normal cursor and close it after we got the apn data from the database.
Bug: 77894798
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Change-Id: I6eb80bbd53354e00e871e974f520668dcbceac63
This is a clean up CL, move the apn settings related class from settings'
root to network's directory.
Bug: 77339683
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Change-Id: I751a6c2a27c9a1e08d7308407d75ccb355f295aa