summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java
AgeCommit message (Collapse)Author
2021-04-02Merge SP1A.210329.001Scott Lobdell
Change-Id: I1e21c5890b5b2e2f2855f09960bc8eec8aa922bf
2021-03-23Revert^2 "Add ViewController to CarrierText."Dave Mankoff
831715fdc26ac7d2a72bf6f471bba54a1bf1eda6 Change-Id: I4df58754737d1badccecc97bc3b27d8c3c09bbc8
2021-03-23Create central TelephonyListenerManager.Dave Mankoff
The TelephonyManager doesn't like have "too many" listeners registered on int at any given time. It will actually throw exceptions when this happens. To lighten the load from the SystemUI side, TelephonyListenerManager now ensures that only one listener is ever subscribed at any point. SystemUI can now use this class instead, piggy-backing on the possibly already subscribed listener to retrieve the events it cares about. Also, use Executors in CarrierTextController instead of Handlers. Bug: 179775696 Test: atest SystemUITests Change-Id: I626e80a91396161022e1fc6387598521f77bf4fc
2021-03-22Fix CS external dependencies on SystemUIpaulhu
- Use formal API getSystemService to get ConnectivityManager. - Use formal API PackageManager#hasSystemFeature( PackageManager#FEATURE_TELEPHONY) to know whether device supports telephony. - Use formal API TelephonyManager#isDataCapable() to know whether device has mobile ability. - Replace NetworkCapabilities#equalsTransportTypes with comparing two NetworkCapabilities' transport types directly. - Replace ConnectivityManager#INET_CONDITION_ACTION by listening onCapabilitiesChanged() network callback. Bug: 183068713 Test: atest SystemUITests Change-Id: I4a53223f36ea09a062a9ddea668a9d0662f0dbbc
2021-02-18Revert "Add ViewController to CarrierText."Alec Mouri
Revert submission 13536242-b179775696-depenency-get-keyguard Reason for revert: Candidate reversion for broken tests: b/180440298 Reverted Changes: I6d0271692:Add ViewController to CarrierText. I4d9a4a21f:Add Controller for Emergency Button. I4c76d99f9:Remove Dependency.get from KeyguardSliceTextView. I730593fcf:Add injection to ClockProvider. Ifbb93e624:Remove Dependency.get from KeyguardStatusView. I237215456:Remove final calls to Dependency.get from keyguard... Change-Id: I3022b0e18b4a40a407de7177be6c94c602f9fcb1
2021-02-16Add ViewController to CarrierText.Dave Mankoff
Rename CarrierTextController to CarrierTextManager to avoid confusion. Removes several calls to Dependency.get(). This was the primary impetus for this change. Bug: 179775696 Test: atest SystemUITests Change-Id: I6d027169247e8b93fe979e54c04a61bbacb4cca5
2020-05-15Merge RP1A.200515.001Steven Laver
Change-Id: Id5fccbb48b2694b0fb266830bd7ace19e8e22ad0
2020-05-12Move IPC calls to background thread in CarrierTextControllerFabian Kozynski
In CarrierTextController, move call to ConnectivityManager to the background thread and cache its value. Move handleSetListening completely to background thread (make sure that callback call is posted in main thread). Also, get KeyguardUpdateMonitor only once, not necessary to keep track of whether we can listen to calls (as we have a cached value now). Test: atest CarrierTextControllerTest Test: manual (start listening), does not trigger StrictMode Fixes: 140034799 Change-Id: Iaf0771e8d71e07212998f44d73465b1a81b2e268
2020-03-04Re-implements networkClassToString for CarrierTextController.Daniel Norman
TelephonyManager::getNetworkClass was removed in c058cac051ab083dc7fb7ea6aa85699110b2e9bf. This change re-implements networkClassToString as networkTypeToString using the network type bitmasks in TelephonyManager. Bug: 150813003 Change-Id: I18d9a62ccbf4fdd66577a3928c3af5088b6bc768
2020-02-13Merge RP1A.200204.001Steven Laver
Change-Id: I1e6c199dbee77379f84675965391c839eae04961
2020-01-22Merge RP1A.200106.001Steven Laver
Change-Id: I321486af27bd4665b73da2c51d88e293b54f3a4c
2020-01-22Use system API ACTION_SERVICE_PROVIDERS_UPDATEDMeng Wang
Bug: 147921202 Test: make Change-Id: I0a92f9a1beb13c7a7e8516462284e7723922f384
2019-12-23mainline:Replace serviceState.getDataRegState and getVoiceRegStateSongFerngWang
Replace serviceState.getVoiceRegState with getState Replace serviceState.getDataRegState with getDataRegistrationState Bug: 146637978 Test: atest NetworkControllerBaseTest (PASS) atest CarrierTextControllerTest (PASS) Change-Id: I0cbdfd5d3de3a78326703ede1640f01430bae18a
2019-12-20Conslidate @MainHandler and similar to @Main (and similar).Dave Mankoff
@MainHandler, @MainLooper, @MainResources -> @Main @BgHandler, @BgLooper -> @Background. Also, move the providers for Handlers and Loopers into the ConcurrencyModule. Bug: 146510722 Test: atest SystemUITests Change-Id: I991735e1fdca397784427409a2ae696a7374f584
2019-12-18[automerger] SystemUI: Show 5G icon for CMCC/CT mode am: acb9ad87ddWeijie Wang
Change-Id: I0793803490a409d188ee8a2861ba26b24b586d42
2019-12-18SystemUI: Show 5G icon for CMCC/CT modeWeijie Wang
1.Show 5G icon when getting 5G icon from side-car in CMCC(or CT) mode 2.Still show 5G icon when mobile data is disabled in CMCC(or CT) mode Change-Id: Ided3b6c1037bf40c73a7291192430b41b4ee4132 CRs-Fixed: 2553169
2019-12-12Use TelephonyManager API to check if device is voice capable.Michele
Bug: 146075164 Test: make Change-Id: I3f19a65012ea355091bbbf22ee3c11054ed19e37
2019-11-27Merge RP1A.191120.001Steven Laver
Change-Id: I861114a47121f0c4cfb375680e22b957bd9988fb
2019-11-22Merge RP1A.191114.001Steven Laver
Change-Id: I30dd2dce3b0c2fcd635381413a213fe3e97be97b
2019-11-19Move logic from QSCarrierGroup into Controller.Dave Mankoff
This removes the injection into the QSCarrierGroup view and moves it into an associated controller instead. Controllers are added for QSCarrierGroup, QSContainer, and QuickStatusBarHeader, though only QSCarrierGroup does any heavy lifting at the moment. The other controllers are parent controllers that are needed to ensure everything is cleanly initialized when the view is inflated. Bug: 144503618 Test: atest SystemUITests && manual Change-Id: Iee539b492581f84b25811a9ae2d60426b49b075d
2019-11-08Remove usage of IccCardConstants hidden APIJayachandran C
This CL replaces all the reference of IccCardConstants.State with TelephonyManager SIM card state values. Bug: 111498835 Test: Manual atest com.android.systemui.statusbar.policy Change-Id: I810cce9ff418e34a8dbea06e91fa25b2300647e0
2019-11-09Merge RP1A.191024.001Steven Laver
Change-Id: I5cda3bba276e99d948b752be87d4599e9f882e0f
2019-11-04Do not consider SIM state for inactive SIM/modem slot.Malcolm Chen
ActiveModemCount could be smaller than max SIM slot in single SIM mode mode. In this case, do not consider mSimErrorState for inactive slots. Bug: 142514392 Test: manual and unittest Change-Id: Ieff64f7c2e7bf4db7d603d3824dc6fea71e3f6cd
2019-10-14Merge RP1A.190923.001Steven Laver
Change-Id: I293059a06fd09d0377ea06c58cf62eeb31d4668e
2019-10-10Rename and publicize getMaxPhoneCount; and deprecate getPhoneCount.Malcolm Chen
To have better names reflecting what getPhoneCount / getMaxPhoneCount actually represent, we replace them with getActiveModemCount and getSupportedModemCount. As getPhoneCount is public API, we mark it as @Deprecated. Bug: 141388730 Test: build Change-Id: If086c50ae803b384691f709057bceeac2fc1d9d5
2019-10-07Fix race condition in CarrierTextControllerFabian Kozynski
If WakefulnessLifcecycle dispatches to CarrierTextController after the CarrierTextCallback has been cleared but the observer has not been removed, there will be an NPE. This change guards the callback against dispatching to a null object. Test: build and unlock Fixes: 142130321 Change-Id: I5da46a0d5c8308870f2b67ae4622daf8e2d53b2f
2019-10-03Merge "Enforce calls to KUM are done on main thread"TreeHugger Robot
2019-10-03Enforce calls to KUM are done on main threadFabian Kozynski
Also fixes CarrierTextControllerTest injection of KUM now that it's a Dependency. Test: atest CarrierTextControllerTest Fixes: 142007915 Change-Id: I9102e07cb1303b3d8ded49ddd5131f0bb5ada244
2019-09-27Merge RP1A.190822.001Scott Lobdell
Change-Id: I515dc97a1060fccf4c2fd8f678f8f90753aa1289
2019-09-23In CarrierTextController replace getPhoneCount with getMaxPhoneCount.Malcolm Chen
As first step for smooth single SIM to DSDS switch, for DSDS capable deviced we always allocate objects as if it's in DSDS mode. Bug: 141388730 Test: unittest and manual Change-Id: I141689fc55063d87f4f7e5c605a461517beeabe4
2019-09-10Fix incorrect text when on Airplane ModeFabian Kozynski
Only generate missing sim text if there are no CarrierName present AND no sims READY. This was an issue when airplane mode with WFC. Also, replace using mCarrierGroups[0] for its text when the sims are missing. Instead use a different view that is made visible when all the QSCarrierGroups should be invisible. Test: manual, using APM Test: atest Fixes: 139556559 Change-Id: I9d83b0eb2a21b786d50c243903bf32b6e761dc77
2019-09-01[DO NOT MERGE] qt-qpr1-sysui-dev @ build 5814791Hyunyoung Song
Test: presubmit setup on source branch Bug: 130289146 Create a Gradle build for SystemUI Bug: 136279712 Daggerize FalsingManager Bug: 137324767 "Unable to instantiate service com.android.systemui.doze.DozeService" exception breaks launcher tests Bug: 137563419 Remove Bouncer reveal delay from bypass flow Bug: 138787339 Allow Services and Activities to be injected into directly. Bug: 139128921 [AS 3.5 RC2, SDK API 29 rev 2] Overload resolution ambiguity: while removing element from HashMap Bug: 64712476 Import translations for dev branches Change-Id: Ib7fd4706c070907fd556c3532957f3b1b046de6d
2019-08-31Fix the looper that KeyguardUpdateMonitor is using.Dave Mankoff
Bug: 139051615 Test: atest SystemUITests && atest SystemUIGoogleTests Change-Id: Ic4dd5978001c208504c137cee41f363d7e70b1b5
2019-08-26IPC StrictModeLucas Dupin
This CL introduces a way of blocking IPCs on the main thread. This is enforced by StrictMode, and enabled on tests and eng builds. All current blocking IPCs were whitelisted and bugs will be filed, in order to fix them for R. Bug: 139360025 Test: adb logcat Test: atest SystemUITests Change-Id: I45af2619605ee36b6bae83ef080272c62754b654
2019-08-20Move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor.Malcolm Chen
This avoids race condition that, KeyguardUpdateMonitor refreshes active sub list however CarrierTextController filtered it based on stale active data subId. By move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor, it becomes the single source of truth about which carrier name should be shown. Bug: 138456731 Test: manual and unittest Change-Id: Ida3a90c5408b056cad7a79fbba84fe880ce1e5be
2019-07-31Fix "Invalid card" text on CarrierTextControllerFabian Kozynski
If there's an invalid sim that does not have a corresponding sub, the text "Invalid card" should be appended to the current carrierText. As this was assembled after this step (when it was empty), it ended up replacing the correct carrierText instead of being appended. Test: atest CarrierTextControllerTest Bug: 138605164 Change-Id: Ibe0e2c3a218ea5c50f94e79cc46bd985b9646af0
2019-07-16SystemUI: Algin with Android SA solutionWeijie Wang
For the 5G icon 1.Show 5G BASIC icon when below conditions are met: a)Data network type is NR and b)Data connection state is DATA_CONNECTED and c)NrIconType is BASIC 2.Show 5G UWB icon when below conditions are met: a)Data network type is NR and b)Data connection state is DATA_CONNECTED and c)NrIconType is UWB 3.Show 5G icon when below conditions are met: a)Data network type is NR and b)data connection state is DATA_CONNECTED For the signal strength 1.Get signal strength from CellSignalStrenghtNr when below conditions are met: a)Data network type is NR and b)CellSignalStrenghtNr is valid 2.Get signal strength from NetworkCallback(AIDL) when below conditions are met: a)Data network type is NR and b)CellSignalStrenghtNr is invalid CRs-Fixed: 2480695 Change-Id: Ia70c37a8f49dcd68fafa100c28bde42630ec2915
2019-06-26Fixes for CBRSFabian Kozynski
* Make sure that KeyguardUpdateMonitor returns the complete list of subscription info, so classes like CarrierTextController can filter it (in the same way as NetworkControllerImpl). * MobileSignalController state should identify a sim as data if it's the active data sub, not the default. Fixes: 135553848 Test: manual, CBRS set active data to be different than default and observe QS Tile Test: manual, CBRS set preferred data to be different than visible sub and observe QS header signal icon and carrier info. Change-Id: I4b348a951e65542b24d263760983c6a6d31dfa6d
2019-06-13SystemUI: Don't display 5G in carrier name when data type is not LTEWeijie Wang
UE moved to 3G n/w due to CSFB, modem still reports 5G_Basic in the ui_mask. 5G shouldn't display in carrier name Change-Id: I586de4812e7f9837a4fa7fbae9f8ba564e77f250 CRs-Fixed: 2439219
2019-06-03Revert "Change carrier name shown No Service to ECO"Bonian Chen
This reverts commit b023773a18c37a8a50a6d18e552b1e440dff13e7. Reason for revert: Not yet decided to release this at this stage Change-Id: Ic0018cadcc228667a64f6f8c694bb6a04f00adc9 Bug: 130857483 Bug: 133201131 Bug: 132291669
2019-05-31Change carrier name shown No Service to ECOFabian Kozynski
In the case where at least one SIM supports EC (either it has service or it supports them), we replace "No service" carrier name into "Emergency calls only". This does not replace the string if the sub is already mark as ECO. Test: manual Test: atest KeyguardUpdateMonitorTest Test: atest CarrierTextControllerTest Fixes: 130857483 Fixes: 133201131 Fixes: 132291669 Change-Id: Ia0ba2076c9750a8bb081994291753dbea68a2270
2019-05-30Merge QP1A.190523.001Scott Lobdell
Change-Id: I48bbfdee20d40d144a8628ca32c8e1ca97f172b2
2019-05-17Merge QP1A.190509.001Scott Lobdell
Change-Id: I97bb3901e50d34a7fbe3c85480379d173ef5c0be
2019-05-10Put SIM locked text in parenthesisFabian Kozynski
Changes how SIM locked text is assembled in CarrierTextController. The text is put in parenthesis after the carrier name (or replaces it if the carrier name is blank). This way, the locked text is easily associated with the corresponding carrier name. Test: visual Fixes: 130857483 Change-Id: I86c5156907b2d245855f8be8158459c30c060495
2019-05-08Merge QP1A.190501.001Steven Laver
Change-Id: I0f9f887d6a33702a6988709d8296731cfdb8f73d
2019-05-08Merge "SystemUI: Display 5G in carrier name for 5G NSA" into q-keystone-qcom-devTreehugger Robot
2019-05-03Make sure to read the opportunistic carrier display propertySooraj Sasindran
Make sure to read the opportunistic carrier display property Bug: 131849855 Test: verified that carrier text is displayed correctly Change-Id: I93f9da8d0a9a8dae276370a0cca2df889229d4c3
2019-04-30SystemUI: Display 5G in carrier name for 5G NSAWeijie Wang
Display 5G in carrier name for 5G NSA Change-Id: I70af98e98558f0207da90cb1a91d42ffcdf882ee CRs-Fixed: 2439219
2019-04-26Show opportunistic provider name conditionallySooraj Sasindran
For testing purpose, we want system UI to show grouped CBRS carrier name as in the upper left corner in system UI. But we want to make this a conditoinal behavior. Bug: 129865342 Test: manual Change-Id: I38a49447ca07615b5e14a92412b68a2a44b2726c
2019-04-19Merge QP1A.190418.001Scott Lobdell
Change-Id: I2725d785c1524df5008f4e0db69a062239c3bc80