Commit Graph

33 Commits

Author SHA1 Message Date
Bonian Chen
504e71c284 [Settings] configuration for hidding SIM notification UI
Hide SIM notification UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I07d9ddeb96ca590decf28126ce97fba4c1783304
2022-10-20 10:11:11 +00:00
Bonian Chen
188ccde75b [Settings] Additional route for dismiss activity dialog
Previous design dismiss an activity dialog through Intent would lead to a pair of creating and finishing activity. The task switch during the creating and finishing may introduce some side effect to the other apps.

This change tried to add additional route to avoid from dismiss through Intent
but sending an async close request to that specific dialog (if available).

Bug: 236956105
Test: local, auto testing
Change-Id: I0a7e0e9826a301f2aa0ca34f40b5570f0e384b4f
2022-08-23 06:13:46 +00:00
Zoey Chen
6978a90e88 [Settings] Remove MobileNetworkActivity
- remove the component name when launching the intent, using the action intent to replace.

- remove MobileNetworkActivity and rename SubscriptionSettingsActivity as MobileNetworkActivity.

Bug: 210593601
Test: atest
Change-Id: Icb7adaf9f7c7dfe01ff5c133aee8387c1663546c
2021-12-16 13:30:25 +08:00
Zoey Chen
2c1fe3ca47 [Settings] Remove the legacy 2-pane registration
Test: atest
Bug: 209606859
Change-Id: Ia1788cdfd9a9e4c6bfeb25be1257f82900867114
2021-12-14 12:32:34 +08:00
Zoey Chen
6cf16b0aa9 [Settings] 1. Add configChange for WFC Activity to cover the changes of rotation and screen size
2. register split rule for MobileNetworkActivity

Bug: 204508876
Test: manual
Change-Id: Iff3dae41293e79b274d2928cb51efea46fb45dd4
2021-11-12 15:22:43 +08:00
Bonian Chen
234b698fb2 Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8.

Reason for revert: failure on test cases

Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
2021-03-30 00:51:15 +00:00
Bonian Chen
d5ccde31a8 [Settings] Support getSystemService(Class<T>)
Add getSystemService(Class<T>) to align the capability with framework
part.

This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047

Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
2021-03-24 00:59:46 +08:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +00:00
Jeremy Goldman
fb41503ca8 SimSelectNotification pending intent include an Immutable flag
Bug: 172212792
Test: atest SettingsUnitTests
Change-Id: Id40e145eed1d268e8147ad21d9b9147268a20453
2021-01-12 16:46:58 +08:00
Ashwini Oruganti
2f349da025 Bulk apply PendingIntent.FLAG_MUTABLE_UNAUDITED.
We've been working hard to require PendingIntents explicitly declare
if they allow their contents to be mutated or not, and to finish
landing that work this change applies the new FLAG_MUTABLE_UNAUDITED
flag to all remaining code locations until they can be manually
inspected.

Bug: 160794467
Test: manual
Change-Id: I7b9ef5dcd35187facef1ec424589b81f834f23c0
2021-01-08 13:14:05 -08:00
Malcolm Chen
3ad8509b15 Automatically dismiss SIM combination warnings and selection dialogs.
When configuring CBRS profiles this dialog / notification will be
dismissed after configuration is done, to avoid confusion.

Bug: 142092510
Test: manual and unittest
Change-Id: Iaf30062f555ec2c119c4aafd6aa013e73b5253f0
2020-12-14 11:55:07 -08:00
changbetty
7eb7f6c795 Add setPackage for PendingIntent in SimSelectNotification
Bug: 153556754
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=SimSelectNotificationTest

Change-Id: I919bbc92df24b5557b3d95c342b330075153a9cd
2020-07-30 23:29:51 +08:00
changbetty
f4d2771526 [Mainline] Use isActiveSubscriptionId instead of isActiveSubId for mainline
Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DisabledSubscriptionControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkSwitchControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=SimSelectNotificationTest

Change-Id: If740c2d7ea2c1392d5fe538091ea6e5c4575ad26
2020-01-08 15:48:33 +08:00
Bonian Chen
4ac6f1a781 Merge "[Help Page] Support help content under 2 CDMA SIM" into qt-qpr1-dev am: 20290d0451
am: 3cce668981

Change-Id: I16c4e2ef30bd62acec5d4b54fe57ac1ff25dbb90
2019-09-19 13:32:01 -07:00
Bonian Chen
fad5a00b84 [Help Page] Support help content under 2 CDMA SIM
Fix the design for displaying help content.

Launch help content from notification (PendingIntent) could not be resolved correctly.
Route through HelpTrampoline to fix it.

Bug: 139040358
Test: Manual with fake from framework side for dual CDMA SIM
Change-Id: Iff3a6e9095c3908b3c5b1a25e2535bcab1858ae2
2019-09-18 22:20:25 +00:00
Raff Tsai
cf1489891a Remove useless png and add vector drawable
Bug: 139336138
Test: visual
Change-Id: I5ccf4855b63f47b138a1662317d0c4ba8ce8984c
2019-08-15 18:04:49 +08:00
Antony Sargent
37008824e6 Use displayName instead of operator name in MMS data notification
When the phone is in DSDS mode and the user tries to send an MMS message
from the SIM that isn't the default for data, we need to pop up a
notification letting them know that the action can't succeed unless they
turn on the advanced option to allow data use for MMS messages. This
notification was using the operator name instead of the subscription
display name, so it didn't reflect any renaming the user might have done
to keep track of their SIMs, which is obviously confusing especially if
they have two different SIMs for the same carrier. This CL switches to
using the subscription display name in this notification.

Fixes: 134771858
Test: make RunSettingsRoboTests
Change-Id: I6995bf9dd6d5e9544e26f0d8e30e97c4e73ab783
2019-06-18 21:54:22 +00:00
Malcolm Chen
57badc2a82 Triggering notifications when dual CDMA SIM combinations are detected
In Settings, catch the intent from Telephony about SIM combination
warning and show a notification about it.

Bug: 132631355
Test: manual - have two cdma capable subscriptions active, make sure
the notification is sent, and tapping on it leads to the helper page.

Change-Id: Ifd0e13781e4afc3bfd82415b3e51fd10176d9f9d
2019-06-04 17:11:09 -07:00
sqian
36e11d2249 Add AutoCancel Notification UI for sim change
Bug: 131380487
Test: manual
Change-Id: Iaf1b1216e358683906b683c688828236f3282cf9
2019-05-21 18:45:14 +00:00
Malcolm Chen
7dd82f966c Create enable MMS notification.
Adding a notification in SimSelectNotification that will be triggered
when receiving a enable MMS request. Tapping on the notificaiton will
lead to the subscription setting page.

Bug: 130222866
Test: manual -- have a test app that sends the intent when mobile
data is turned off. And verify that the heads-up notificaiton is shown
and that it will lead to subscription setting page.

Change-Id: Ia80e8e5ab20adf78a31647a23cb2ba8dac690e41
2019-04-29 18:49:27 +00:00
Antony Sargent
8eb1660da7 Update intent in SimNotification
When you add/remove a SIM, telephony notifies settings and we pop up a
notification. Tapping on that notification was still leading to our old
SIM cards page, but should instead lead to the Network & internet page
where we've added a bunch of new UI for doing the same sorts of
operations.

Bug: 128859223
Test: manual (remove a SIM or add a SIM in DSDS mode; a notification
telling you that sim cards have changed should pop up, clicking that
should lead to Network & internet page in settings)

Change-Id: I9c1e656dcc3e8fc9147bb99861d8fdc15ed09be9
2019-04-12 16:10:52 -07:00
Malcolm Chen
a05e6f8182 Correct name of PRIMARY_SUBSCRIPTION_LIST_CHANGED.
Correct name of PRIMARY_SUBSCRIPTION_LIST_CHANGED in manifest.
Also, make sure SimSelectNotification only listens to that intent.

Bug: 128645056
Test: manual
Change-Id: I008e5346ff1e015d1aa57ca31844426e33bd99b8
2019-03-27 17:53:22 -07:00
Malcolm Chen
f2fca31c51 Clean up a few names of Telephony intent extra.
Bug: 128645056
Test: build
Change-Id: I5d47b132abb722282bd10b9fbb362fb1f1d32f11
2019-03-22 18:03:42 -07:00
Malcolm Chen
41855ec8b9 Move SIM select logic from SimSelectNotification to Telephony.
SimSelectNotification used to listen to SIM_STATE_CHANGED from Telephony
and do checkings to decide whether to pop up notification and
SimDialogActivity. The logic needs updated and only Telephony knows it
well. So this change moves the logic into Telephony. SimSelectNotification
only listens to Telephony's decision, brings up notification and trigger
SimDialogActivity.

Bug: 128645056
Test: sanity and manual
Change-Id: I6153e27dd00dd9cdf8682f135eb39f8af3a75608
2019-03-19 13:57:19 -07:00
Malcolm Chen
14dde50c3a Don't show hidden Cellular subscription in Settings.
Replace getActiveSubscriptionInfoList() with
getActiveSubscriptionInfoList(true) so that settings will not show
hidden subscriptions to the user in various pages.

Bug: 121396526
Test: manual
Change-Id: I717999fed7d3a5a037914239694bef52df7c6207
2019-01-16 00:21:30 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Bruno Martins
4c7070241a Settings: Add notification channel for SIM selection
Change-Id: I9318311fd6378a82050bb1604c29f0af2501c8b7
2017-11-14 22:28:59 +00:00
Udam Saini
679f7ad07e Prevents users from being added if device is not provisioned
Also added a utility function for checking provisioning, instead of
repeating code for this check in several places.

bug:26156445
Change-Id: I9f4a280dd0cdf889f892e386dbf6a3fdb2a052ef
2016-03-25 13:33:57 -07:00
Shishir Agrawal
d2b0fc066c Unhiding MSIM APIs.
1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
   APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.

Bug: 26772894
Change-Id: I69471769ece56dd2d505f087d2ed3b585eb4b2d0
2016-01-26 13:48:21 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Sanket Padawe
9d7eb49e7b Send sim change notification based on sim state change.
+ Send sim change notifications based on Sim state change rather then based
on subscription change.
+ Make SimSettings dynamically update based on subscriptions changed. Would
support hotswap which was not supported before this.

Bug: 20739298
Bug: 18385348
Change-Id: I5bb4b05f55b94eb0ed2a1a83fe2f168192b2b684
2015-06-01 10:25:46 -07:00