Commit Graph

1831 Commits

Author SHA1 Message Date
Philip P. Moltmann
bc054d8436 Rename RuntimePermissionPresenter to PermissionController
As this has already evolved from just presenting data. In the future any
permission related calls to the permission controller will be added here.

As the calls are protected by different permissions the binding will not
require a permission anymore, but each individual call checks the
permission.

Bug: 120221960
Test: Looked at settings UI showing data from this interface
Change-Id: I6b4a5c3b7ee17b145e11e2c1b6e11a8a232bffed
2019-01-03 11:39:43 -08:00
Lifu Tang
5509a81a87 Make constructor of Access public
Unit test needs access to the constructor. Moreover, it doesn't make any
harm to open up access to this constructor.

Bug: 120910747
Test: run unit test
Change-Id: I063552b5a082cf01b3ae3eb708659b2700fc4962
2019-01-02 13:16:55 -08:00
Lifu Tang
054cfe5879 Add missing unit test
Bug: 120910747
Test: run unit test
Change-Id: I45c941ba50c1b9ae0b5fa83c6fdc8f94b4e360e9
2019-01-02 13:16:39 -08:00
TreeHugger Robot
6e2af125e3 Merge "Add null check for AclStateChangedHandler" 2019-01-02 02:41:19 +00:00
Chienyuan
c42180619d Add null check for AclStateChangedHandler
When we receive ACL state change and can't find corresponding
CachedBluetoothDevice, we will trigger onAclConnectStateChanged with
null activeDevice and cause NullPointerException.
Add a null check in AclStateChangedHandler to prevent it.

Bug: 122049350
Test: RunSettingsLibRoboTests
Change-Id: Iaabccc8c4ad60dbae14bbb0f6af655be06bc18ea
2018-12-28 10:29:51 +08:00
TreeHugger Robot
a951d1dfc4 Merge "Remove unreviewed code" 2018-12-27 18:39:11 +00:00
TreeHugger Robot
53f0d06de5 Merge "Fix WifiManager NPEs in CryptKeeper UI." 2018-12-27 18:26:36 +00:00
timhypeng
97c6cf625e Remove unreviewed code
-Recover to ag/5518820 Patchset #31

Bug: 119065243
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I8fc7b526f1558090789ad9fb30a20d38c8a978c6
2018-12-27 07:50:58 +00:00
hughchen
0487263c50 Add getMediaDeviceById() method
Add getMediaDeviceById() for get MediaDevice through unique id.

Bug: 121083246
Test: build pass
Change-Id: I8e44c3167cfe7d0fc84e8132219dd17c76b4360c
2018-12-27 11:46:19 +08:00
Amin Shaikh
bc38add37f Fix WifiManager NPEs in CryptKeeper UI.
Ensure systemui can boot when WifiManager is null. This patch merges
go/aog/804695 into internal master.

Change-Id: I7861f9c30f109852bb200bfa17207e74c4b8ac1c
Fixes: 109588864
Test: manual
2018-12-26 15:31:45 -05:00
timhypeng
a8b826c055 Implement naive rule of device order on seamless transfer
- Add ConnectionRecordManager for device usage record operation
- Add test cases to verify naive rules

Bug: 119065243
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Idf1c0ed575d1feeb3f1eb93b41cd209c3a510bfa
2018-12-24 02:16:21 +00:00
TreeHugger Robot
72830edb8b Merge "Fix issue to avoid Hearing Aid show duplication device." 2018-12-20 18:38:28 +00:00
TreeHugger Robot
f373d1c189 Merge "Public isConnected() method" 2018-12-20 17:59:49 +00:00
hughchen
367d0ca931 Public isConnected() method
Public isConnected() method to know which MediaDevice is connected
to play media.

Bug: 121083246
Test: build pass
Change-Id: Ibf877bb6c9eaedc6a839f5108a5ae8b47219f2f6
2018-12-20 17:50:03 +08:00
wengsu
5194558d10 Fix issue to avoid Hearing Aid show duplication device.
Bug: 119536231
Test: make -j56 RunSettingsLibRoboTests
Change-Id: I086b92570475f52ab2fe54ff9d4b26d207e5999c
2018-12-20 13:11:08 +08:00
TreeHugger Robot
708e111e75 Merge "Add bluetooth related log to improve debug" 2018-12-20 02:20:08 +00:00
Fan Zhang
b2944525c7 Fix a NPE and add logging to catch offender in the future
Change-Id: Ic177ad71231e2210b17601e6718123b47634f26f
Fixes: 121116425
Test: robotests
2018-12-19 10:11:11 -08:00
Chienyuan
559b7f12f5 Add bluetooth related log to improve debug
1. add address log when CachedBluetoothDevice update profiles
2. add address log when CachedBluetoothDevice.onProfileStateChanged
3. add log for deviceFoundHandle when cachedDevice != null

Bug: 114317168
Test: build pass
Change-Id: I37ea5ce210542f4e9afc13f669cec6db88839a85
2018-12-19 10:22:51 +08:00
Lifu Tang
29ca21ba8e Merge "Retrieve apps with recent location access" 2018-12-18 08:43:31 +00:00
Oscar Shu
8666430e1c Merge "About phone page getFactoryMacAddress" 2018-12-18 03:42:40 +00:00
TreeHugger Robot
339699b59f Merge "Add util for reverting schedule mode" 2018-12-18 00:41:43 +00:00
xshu
6b93d8339a About phone page getFactoryMacAddress
Currently, the about phone page is displaying whatever the current MAC
address is, and with MAC randomization enabled by default, this MAC could
change arbitrarily and depending on the currently connect network's
settings.
Instead of showing the current MAC, we should be displaying the factory
MAC address, which is more relevant in the about phone page.

Bug: 111634904
Test: atest WifiMacAddressPreferenceControllerTest
Test: enable mac randomizations and verify that in the about phone page
the factory MAC is displayed instead of the randomized MAC.
Change-Id: Ia658ae86ee7807e226aa6f560b935af27774fcf1
2018-12-14 17:15:10 -08:00
Salvador Martinez
8adf58b66a Add util for reverting schedule mode
This is needed for keeping people in a good state in case they
uninstall the app that provides the signal for routine automatic
battery saver mode

Test: in sibling CL
Bug: 111450127
Change-Id: I0ecc59cc8b8275be1f1211207ad523f45b86175e
2018-12-14 15:14:33 -08:00
Tetsui Ohkubo
ee6939784b Handle cancellation of 3rd party IME explicitly.
When a 3rd party IME is enabled for the first time, a warning dialog is
shown.
The dialog has a cancel button, and it triggers
onSaveInputMethodPreference(). However, when it's cancelled by the back
button, it did not trigger onSaveInputMethodPreference().

It still works as intended on stock Android, but on ARC++ we need the
callback to be always fired every time it's cancelled.

Test: manual
Bug: 112442972
Change-Id: Ibdbaa020957ccd5a77a7fe5c67937edd19b8455f
2018-12-14 12:55:21 +09:00
Lifu Tang
60db4e77e3 Retrieve apps with recent location access
Instead of recent location request

Bug: 120239674
Test: unit test and manual test
Change-Id: I12a083074f4b4cc3acf10831d29da25953c567a6
2018-12-12 11:31:06 -08:00
Lifu Tang
78e0756ece Undeprecate injector API to allow change summary
Bug: 120236748
Test: build, flash, and test manually
Change-Id: I96042f51ce3fe32d15596b026f802f89dabf8405
2018-12-12 11:30:31 -08:00
Philip P. Moltmann
bbe5d429c7 Merge "Add new method to count how many apps have permissions" 2018-12-11 03:14:16 +00:00
Philip P. Moltmann
573095244b Merge "Move RuntimePermissionPresenter to android.permission" 2018-12-10 20:51:31 +00:00
TreeHugger Robot
a917c35add Merge "Remove mMessageRejectionCount and related code" 2018-12-10 02:25:36 +00:00
Jeff Sharkey
633a13e2fa Extract common methods into ContentInterface.
Existing APIs that accept a ContentResolver are too restrictive when
the caller has their own ContentProviderClient already bound and
configured, so we're in the market for a solution to open those
existing APIs to accept a wider range of inputs.

The solution we've come up with is to introduce a super-interface
which contains the common ContentProvider APIs, and then make
ContentProvider, ContentResolver, and ContentProviderClient all
implement that interface for consistency.

After this change lands, we can then safely relax existing APIs to
accept this new ContentInterface, offering a clean path to solving
the problem outlined above.

Bug: 117635768
Test: atest android.content.cts
Test: atest android.provider.cts
Change-Id: Ic5ae08107f7dd3dd23dcaec2df40c16543e0d86e
Exempted-From-Owner-Approval: keep tests working
2018-12-08 11:25:13 -07:00
yuemingw
1874c2592c Add restriction helper method for Cross profile calendar UI.
Bug: 117976974
Test: make ROBOTEST_FILTER=CrossProfileCalendarPreferenceControllerTest -j40 RunSettingsRoboTests
Change-Id: I0156ef91f806f055a5ac67e84817771c57ddd839
2018-12-08 11:19:54 +00:00
Chienyuan
5e1ed5c743 Remove mMessageRejectionCount and related code
Message permission choice will always be saved, mMessageRejectionCount
and related code are no longer need.

Bug: 120291728
Test: build pass
Change-Id: I2d8ee57b5a8e5e4fb96f762f2b8d68e6d2f97722
2018-12-06 19:58:04 +08:00
Philip P. Moltmann
08cac8e486 Add new method to count how many apps have permissions
Test: Called API and looked at result
Bug: 120221960
Change-Id: Icb8ee7f46849f26f4625b42e7b482c655409d175
2018-12-04 16:53:23 -08:00
Philip P. Moltmann
dbf78b8127 Move RuntimePermissionPresenter to android.permission
Consolidate all permission related code in a single java package.

Test: atest SettingsLibRoboTests
      Looked at Settings AppInfo UI (uses RuntimePermissionPresenter)
Bug: 120221960
Change-Id: If135e984a8273e9bed80cab9fbf2d70f40a05c7f
2018-12-04 16:53:23 -08:00
TreeHugger Robot
ea6dcec9fa Merge "Remove data usage v1 code." 2018-12-04 17:53:33 +00:00
Alex Chau
3c81956e99 Add category key for EnterprisePrivacySettings
Bug: 120414731
Test: make RunSettingsLibRoboTests -j40
Change-Id: I9e646ce96786c63e02bd69af5400a07c9b7ee955
2018-12-03 17:49:01 +00:00
TreeHugger Robot
c4cbe40fda Merge "Display Hearing Aids name on UI tile" 2018-12-03 16:31:16 +00:00
Doris Ling
66cbe991ba Remove data usage v1 code.
Bug: 117420679
Test: make RunSettingsLibRoboTests
Change-Id: I3862b27c4e1df7d5bf560131bf29b89630603cc9
2018-11-30 16:34:45 -08:00
Stanley Tng
c118294af8 Display Hearing Aids name on UI tile
When the current device is a hearing aids, display the name under the
tile.

Bug: 117423826
Test: Manual testing on phone with hearing aids connected
Change-Id: I98cfda7905763a3da3dbc1fbed13fee881da7bb2
2018-11-30 15:09:35 -08:00
TreeHugger Robot
de321aeda4 Merge "Refine the sync in CachedBluetoothDevice" 2018-11-28 02:26:25 +00:00
Maurice Lam
9d3b8b3099 Merge "Update comments for security type in AccessPoint" 2018-11-27 00:43:18 +00:00
Neil Fuller
f58e10d979 Merge "Track move of timezone classes to libcore.timezone" 2018-11-22 09:31:19 +00:00
Neil Fuller
164394db8e Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Exempt-From-Owner-Approval: Trivial import change
Change-Id: Ie90c219799cbf9601a22a2d972c09e3d94fc0c43
2018-11-22 09:31:04 +00:00
TreeHugger Robot
657c8ff19a Merge "Clean up getConnectionSummary()" 2018-11-20 21:15:45 +00:00
wengsu
6d263c206e Clean up getConnectionSummary()
Bug: 119391779
Test: make -j56 RunSettingsLibRoboTests
Change-Id: I44245a51d27e5cc7e71a2be096f1b1cf400da04e
2018-11-16 19:30:56 +08:00
Hai Shalom
828b13cbea [WPA3] Add SECURITY_MAX_VAL to support dynamic Add network spinner
Add SECURITY_MAX_VAL to support dynamic Add network spinner, needed to
convert spinner position to security type.

Bug: 112195778
Test: atest AccessPoint
Change-Id: I2f64dc433a36366dee2841de90558259434a8589
2018-11-15 19:32:21 -08:00
Hai Shalom
e3cc06875f [WPA3] Filter unsupported networks from scan results
Filter unsupported networks from scan results. New WPA3 networks and OWE
networks may not be compatible with the device HW/SW, and such networks
will not appear in the scan results view.

Bug: 112195778
Test: Functional test with WPA3/OWE AP and confirming filtered correctly
Change-Id: Ic79e533a0e99aa38366b178feafb28bd286202d1
2018-11-14 15:16:51 -08:00
Fan Zhang
2429492504 Merge "Remove arbitrary Pair from action() logging method." 2018-11-14 07:27:14 +00:00
Fan Zhang
f63a61d294 Remove arbitrary Pair from action() logging method.
Caller should use generic action(int, int, int, String, int) instead.

Bug: 117860032
Test: robotests
Change-Id: I4db5b9e764478bcb36ba5c96e805a929d212b344
2018-11-13 21:50:39 -08:00
Maurice Lam
7cdbe199fd Update comments for security type in AccessPoint
There are no resources in array.xml that references the security or
PSK field, so updating the comments to match.
There is also no need to keep the list sorted -- new values should be
added to the end and any string-array resource values can be added to
the end accordingly.

Test: None
Change-Id: I85e7de9c9f08468f6aaeaa9af1482e304a501a76
2018-11-13 14:09:39 -08:00