Commit Graph

7488 Commits

Author SHA1 Message Date
Andrew Sapperstein
72aded338a Merge "Add UI for mainline modules licenses." into qt-dev 2019-06-28 16:56:04 +00:00
TreeHugger Robot
3288037bd2 Merge "Check isWfcProvisionedOnDevice in WifiCallingSettings" into qt-dev 2019-06-26 05:35:29 +00:00
Andrew Sapperstein
56a8c33c1b Add UI for mainline modules licenses.
Added a module licenses option that lives in Legal information settings.
Clicking that option opens module licenses page, which displays every
module by name, filtered to exclude modules without license files.
Clicking a module in the list opens HTMLViewer.

Created ModuleLicensesProvider, a new ContentProvider that serves as a
redirect for the Uris sent to HTMLViewer so that they open asset files.
In order to provide the redirect, the provider will write the license file
to a file in Settings' cache directory when the license does not exist
in the cache or is outdated. The provider then opens that cached file.

Fixes: 135183006
Test: robotests
Change-Id: I7d69da34780c8c4efb150d0c0411078c12bc80d8
2019-06-25 16:01:38 -07:00
Antony Sargent
46d819272a Check isWfcProvisionedOnDevice in WifiCallingSettings
On the SIM details page, the preference leading to a page for
configuring wifi calling will appear based on the results of the
MobileNetworkUtils#isWifiCallingEnabled helper function. That helper
uses the ImsManager to check several conditions, among them both
isWfcEnabledByPlatform and isWfcProvisionedOnDevice.

The page for configuring wifi calling has a tabbed UX, with one tab for
each active subscription that supports it. The WifiCallingSettings class
gets a list of the active subscriptions to determine which tabs to show,
and removes any that don't support wifi calling, but was only using the
isWfcEnabledByPlatform test to do so. This is a problem because the code
for showing the contents inside the tab, in WifiCallingSettingsForSub,
includes a sanity check of isWfcProvisionedOnDevice and calls finish()
if that returns false.

What this meant in practice is that if you happened to have 2
subscriptions where one returns true for both isWfcEnabledByPlatform and
isWfcProvisionedOnDevice, but the other only returned true for
isWfcEnabledByPlatform, then you'd never be able to succesfully use the
wifi calling page at all because the tab for the subscription you
*aren't* trying to configure would always call finish() early.

The right long term solution to this problem is probably to remove the
tabbed UX entirely from this page, since we probably don't need it given
the overall new multi-SIM UX. But there may still be legacy uses and
that is likely a bigger change than we want to make right now.

As a stopgap, this CL just adds a check of isWfcProvisionedOnDevice to
the code for filtering out ineligible subscriptions from the tabbed
interface, which we should have always had anyway.

Fixes: 135591718
Test: make RunSettingsRoboTests
Change-Id: I656c3d3fb30cb6fabcb86685eae38c5f0cd0c6f2
2019-06-25 14:16:53 -07:00
TreeHugger Robot
87fadeeb4a Merge "Add a listener for subscription changes to SimDialogFragment" into qt-dev 2019-06-25 17:54:54 +00:00
TreeHugger Robot
279050c8d6 Merge "Import translations. DO NOT MERGE" into qt-dev 2019-06-25 14:46:00 +00:00
Bill Yi
fe1b808001 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I275c2124cebaca1f069837b138a01b9e11f77c55
2019-06-25 04:07:28 -07:00
Hai Zhang
71f2614736 Revert "Add special apps access settings page for financial app."
This reverts commit 43374eabb8.

Reason for revert: No longer needed because we are using whitelist for
SMS permission

Fixes: 135213238
Test: presubmit
Change-Id: I182be4a1136521f325866e70e875439c17816ef2
2019-06-24 21:11:36 +00:00
Antony Sargent
45f0701380 Add a listener for subscription changes to SimDialogFragment
For some kinds of telephony changes that might happen while we're
already showing one of these dialogs, we already get sent a new intent
for the dialog which we internally convert into a refresh of the dialog
contents instead of stacking a new copy on top of the old one.

But it turns out there are some other cases where the telephony stack
doesn't send a new intent for the dialog but *does* send a change event
through the SubscriptionManager, and we want to respond to those as
well. This CL adds a listener for those events.

Fixes: 135276696
Test: make RunSettingsRoboTests
Change-Id: Ifb93ae95f45fda5831e112306dd9361ccaa5119c
(cherry picked from commit 6a1d7e60ac)
2019-06-24 16:58:40 +00:00
Julia Reynolds
ab63fd3c25 Remove dead code
Test: try to search 'gentle'
Fixes: 135640138
Change-Id: If03703e59f77206da08fc80e88bb986f821c18fe
2019-06-21 13:24:05 +00:00
Raff Tsai
39c6a16aba Cannot switch between multiple TTS engines
That is caused by layout xml changes. The radio button was clickable
in old xml resource. But it is not clickable in new xml resource.
Therefore we can't receive click callback. Fixed by changing
Radio button state when preference is clicked.

Fixes: 135285101
Test: manual, make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.tts"
Change-Id: Idd7bf37d9ccbc1b56d41978d19dc05c8a81cc49a
2019-06-19 16:35:35 +08:00
TreeHugger Robot
0304f4d1ce Merge "Replace isSubscriptionEnabled with isActiveSubId." into qt-dev 2019-06-19 03:11:25 +00:00
TreeHugger Robot
e2ab7540a3 Merge "MobileData slice should be null if not-actionable" into qt-dev 2019-06-19 02:26:20 +00:00
Malcolm Chen
dd0b2fc380 Replace isSubscriptionEnabled with isActiveSubId.
As we don't allow pSIM modem disablment, we should simply use isActiveSubId
to decide whether a subscription's preferences is changable. This will
avoid potential modem bugs that reports wrong modem status that result
in Setting's UX error.

Bug: 135222940
Test: manual and robo
Change-Id: I7cccf2fdab7c89d26dac4daad51cd5d6f3a90eba
2019-06-18 23:55:35 +00:00
Antony Sargent
40e9ffc2f0 Merge "Use displayName instead of operator name in MMS data notification" into qt-dev 2019-06-18 21:54:33 +00: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
Matthew Fritze
63bc6a1090 MobileData slice should be null if not-actionable
In cases where MobileData should not be changed:
- Airplane mode
- No data subscriptions

we will return a null slice, rather than a slice with a no-op intent
attached as a primary action. The problem with the no-op intent is that
Slices assumes all actions are by definition, actionable, and the the
TalkBack description announces that the item is clickable, which it
really isn't.

We will in the future investigate disabled actions on Slices, but this
is the short-term fix.

Fixes: 132924748
Test: Robolectric
Test: Panel tester app
Change-Id: I1d62af32fe2dd985f0b52ea4188651e76f9c90ec
2019-06-18 14:53:21 -07:00
Bill Yi
23e86df342 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Iac730b3d5c81a72cd072a25c203e67035fae3cf6
2019-06-18 06:25:01 -07:00
Ivan Podogov
9a1c75c57a Merge "Add "Your work policy info" entry in Privacy settings" into qt-dev 2019-06-17 12:39:10 +00:00
Mehdi Alizadeh
7d43125964 Show a dialog with a slider to set the back gesture's sensitivity
Bug: 131447780
Test: Manual test on device
Test: make RunSettingsRoboTests ROBOTEST_FILTER=RadioButtonPreferenceWithExtraWidgetTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemNavigationGestureSettingsTest

Change-Id: I9fcd1a50c77689118857326de0cf8082e835b491
2019-06-14 23:40:11 +00:00
Lei Yu
b4d94a8ccc Merge "Handle null intent in WifiCallingPreferenceController" into qt-dev 2019-06-14 22:38:59 +00:00
Ivan Podogov
75a10d1fd2 Add "Your work policy info" entry in Privacy settings
Bug: 132904820
Test: manual
Change-Id: Id706d450c3ad6a6a8c1e402d39d18e048cdb6519
2019-06-14 13:07:21 +01:00
TreeHugger Robot
4af74dd86d Merge "Game Driver: Allow user to apply prerelease driver for all apps" into qt-dev 2019-06-13 23:44:36 +00:00
TreeHugger Robot
7af299c604 Merge "Fix Calls/SMS default SIM selector" into qt-dev 2019-06-13 23:25:04 +00:00
Antony Sargent
22b827db55 Fix Calls/SMS default SIM selector
In cases where a SIM is initially disabled, even after you turn it on
the ListPreference's for selecting the default SIM for Calls and SMS
weren't working because the preference change listener wasn't getting
registered. This CL fixes that for these controllers by always
registering a change listener whenever we make the preference visible.

Fixes: 134472294
Bug: 135142209
Test: make RunSettingsRoboTests
Change-Id: Ia9362b7f26309bdbd6c5e8140fb606b28e2b34d8
2019-06-13 23:24:34 +00:00
Lei Yu
41bb2cb6a8 Handle null intent in WifiCallingPreferenceController
When intent is null, we will hide wifi calling preference however
its listener might still triggered with null intent.

This CL update controller so it can handle this event inside listener
callback.

Fixes: 135095929
Test: RunSettingsRoboTests
Change-Id: I4c5aba03871f11a2d9f9b4da329c2c2655ff9adb
2019-06-13 14:47:56 -07:00
Yiwei Zhang
687906f2f9 Game Driver: Allow user to apply prerelease driver for all apps
Currently the global opt-in is only available to Game Driver. This change has
added an option to let developers to opt-in all apps to use prerelease driver.
GameDriverEnableForAllAppsPreferenceController is then refactored from
SwitchPreference to ListPreference to support this change.

Bug: 134881329
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GameDriver
Change-Id: I6dcb3a22a4033a576605d42aa80b09db088d4aa2
2019-06-13 12:21:49 -07:00
Yiwei Zhang
240760c570 Game Driver: Add UI support for prerelease Game Driver
Bug: 134881329
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GameDriver
Change-Id: I9c710a5e6adff9b01c656d576f53f9b4b3360207
2019-06-12 18:09:36 -07:00
TreeHugger Robot
5836158f2e Merge "Remove on/off toggle for physical SIMs" into qt-dev 2019-06-11 20:06:54 +00:00
tmfang
564fcb90ab Fix overlapping problem on notification screen
If we didn't set view and lifecycle for EntityHeaderController,
it only sets "z-order" as 0 for action bar.

So, user sees overlapped problem while user is scrolling view.

For now, we set view and lifecycle as parameter for EntityHeaderController,
then EntityHeaderController can change "z-order" while scrolling view.

Test: visual, robotest
Fixes: 132819126
Change-Id: Ieb01b26e4d6ca4d82f72371620938665de8149a0
2019-06-11 13:57:57 +08:00
Antony Sargent
e548fc6334 Remove on/off toggle for physical SIMs
Our original design for mobile network subscription management included
having an on/off toggle for both eSIMs and physical SIMs. However, it
turns out that our current telephony stack has some problems with
disabling physical SIMs, so for now we're removing the on/off
toggle. Because of this, we've added a footer to the SIM details page
for physical SIMS letting users know that to disable them you need to
remove them from the device.

Even though we're removing the on/off toggle for pSIMs, there are still
a few edge cases where you could end up with a disabled one (eg having
two SIMs in single-SIM mode where the eSIM is active and then you erased
the eSIM). In order to have a way to re-enable the pSIM in these cases,
this CL changes the relevant pref's summary to "Tap to activate <name>"
and makes the tap action begin the re-enabling. This can affect either
the Mobile network pref on the Network & internet main page (if this
disabled pSIM is the only SIM), or an entry in the Mobile networks list
page (if there are still multiple SIMs present).

Finally, this also fixes a problem where we weren't showing the on/off
toggle for eSIMs if you only had one SIM total; we actually always want
to show it for eSIMs.

Bug: 132921553
Test: make RunSettingsRoboTests
Change-Id: Id0750ebd5bed46dc2450b65b53cc81847ef09b82
2019-06-10 14:41:08 -07:00
George Chang
e4c2e427a1 Fix NFC state switched off every time user entered connection preferences page
NfcAirplaneModeObserver added a scenario that
switched NFC off every time  a user entered connection
preferences page if airplane mode was on.
Even when a user manually switched on NFC, the observer would still
turn NFC off when re-entering connection preferences page.

GSAM TS.27 certification requires NFC state to be consistent
under AirplaneMode before and after reboot the device.
NfcAirplaneModeObserver breaks the requirement
because it would always switch NFC off under airplane mode
when a user checked the NFC state in settings page.

Fix it by removing NfcAirplaneModeObserver.
Keep the NFC state consistent.


Bug:128384879
Test: make RunSettingsRoboTests / Check Nfc on/off Status
Merged-In: If4c8e47c2509b09e8bc1a464e1ab329b945e3d20
Change-Id: If4c8e47c2509b09e8bc1a464e1ab329b945e3d20
2019-06-07 00:11:32 +00:00
Julia Reynolds
a1a598d44e Silent notifs appear on lockscreen by default
Test: atest
Bug: 134613164
Change-Id: I1ee39a1302010a2a29ba6d0060f19565e41859a2
2019-06-06 17:03:20 +00:00
Suprabh Shukla
732edc3e39 Kill uid when REQUEST_INSTALL_PACKAGES is denied
Process privileges like open fds need to be revoked, when this
permission is denied by the user.

Test: Manually verified by checking logs.
Robotest:
atest SettingsRoboTests:ExternalSourcesDetailsTest

Bug: 133504844
Change-Id: I81da0b3a5d6c54e392828829d1a2c43488439504
2019-06-05 21:15:17 +00:00
Xiangyu/Malcolm Chen
13cbb2eea2 Merge "Triggering notifications when dual CDMA SIM combinations are detected" into qt-dev 2019-06-05 18:03:17 +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
Alan Stokes
c53f5ecb3d Merge "Cleanup background activity starts for release." into qt-dev 2019-06-04 14:26:29 +00:00
Antony Sargent
aeb1da0db9 Add a "data during calls" preference
This adds a switch which appears on the SIM details page for any SIMs
that aren't the default on for data. It lets the user opt-in to turning
on data on this SIM only in the case where there is an active call -
this is needed because in some cases the default data SIM may not be
able to be used when a call is active on another SIM.

Bug: 132114205
Test: make RunSettingsRoboTests
Change-Id: Ie44c56e0f486fd93aff411a0ba0e47d3695a4941
2019-06-03 15:20:33 -07:00
Lei Yu
c9fbd2ee50 Merge "Use new API to build NetworkTemplate" into qt-dev 2019-06-03 16:54:29 +00:00
Mehdi Alizadeh
cad67cdc0a Merge "Disables the Gesture nav option if 3P launcher is default" into qt-dev 2019-05-31 21:08:08 +00:00
Mehdi Alizadeh
ffea2ae488 Disables the Gesture nav option if 3P launcher is default
Disables the Gesture navigation radio button if 3P launcher is set as
default for current user. Also shows an info icon on the right side that
opens a dialog explaining why it is disables.

Bug: 129532605
Test: Manual test with 3P launcher
Test: make RunSettingsRoboTests ROBOTEST_FILTER=RadioButtonPreferenceWithExtraWidgetTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemNavigationGestureSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemNavigationPreferenceControllerTest

Change-Id: I90000c74246699fa9391ac042c87d7f0ece03637
2019-05-31 12:26:28 -07:00
Lei Yu
ded55a1401 Use new API to build NetworkTemplate
This CL is built to make CBRS show correct data usage, by merging
all subscriberId under same groupuuid.

Bug: 133865338
Test: RunSettingsRoboTests
Change-Id: I3c717d0f1a1b95aa21c2ccefe4d1cefb4d854cb5
2019-05-31 10:19:17 -07:00
Lei Yu
2148c1a207 Merge "Fix issues in battery usage accounting" into qt-dev 2019-05-31 17:17:51 +00:00
TreeHugger Robot
63088840c4 Merge "Remove Permissions Hub." into qt-dev 2019-05-31 13:02:12 +00:00
Christine Franks
b747c5c270 Merge "Add SIM color picker" into qt-dev 2019-05-30 20:01:48 +00:00
Lei Yu
f32025a17d Merge "Update SliceView when slice is null" into qt-dev 2019-05-30 17:38:59 +00:00
Joel Galenson
1e7c172ad5 Remove Permissions Hub.
Bug: 132292477
Test: View all related screens.
Change-Id: Ic0e890e04f210f3be3eb80c95e398a40a8062001
2019-05-30 08:30:49 -07:00
TreeHugger Robot
fde0bee473 Merge "Fix IllegalArgumentException in AudioHelper" into qt-dev 2019-05-30 09:39:33 +00:00
Raff Tsai
1a2b34b625 Fix IllegalArgumentException in AudioHelper
Audio streams for phone calls in BT device (STREAM_VOICE_CALL) is not
supported in AudioManager.getStreamMinVolume(), fallback to use
STREAM_VOICE_CALL

Fixes: 133812547
Test: make RunSettingsRoboTests
Change-Id: I8e330f60bae2a7cf9cd0cf7288076b8320ccc504
2019-05-30 16:18:37 +08:00
Christine Franks
8869db9555 Add SIM color picker
Bug: 133193155
Test: make ROBOTEST_FILTER="(RenameMobileNetwork*)" RunSettingsRoboTests -j48

Change-Id: Ifae8b77bc5b4ba1039ede70889468a018f57d78f
2019-05-29 17:03:31 -07:00