Commit Graph

20404 Commits

Author SHA1 Message Date
Jeff DeCew
e2d38c5ac5 Merge "Remove Notification.DevFlags" into sc-dev 2021-03-23 19:50:27 +00:00
Flavio Fiszman
5785c5c68f Merge "Show messages count in People Tile" into sc-dev 2021-03-23 16:42:53 +00:00
Mustafa Acer
6cebc2f2ac Add a new permission for external time sources
This CL adds a new permission called SUGGEST_EXTERNAL_TIME that
gates TimeManager.suggestExternalTime calls.

The new permission is marked as 'privileged' as protection level. This
could result in third party apps preinstalled on the system image to
potentially get this permission. This is OK for the following reasons:
 - OEM coordination is needed to grant 3P apps this permission, so
 adding "privileged" doesn't introduce significant risk.
 - This permission/API doesn't guarantee that the suggested timestamp
 will immediately be used as the new system timestamp. The system must
 be configured so that the external time source has a higher priority
 than other time sources (e.g. GNSS) for the external time suggestion to
 be used. This configuration is also done by the OEM. That introduces
 significant roadblock for a malicious app to do anything useful with
 this permission.
- More importantly, apps can set system time directly using
TimeManager.setTime() which requires SET_TIME permission. This
permission is also signature|privileged, so this change is consistent
with it.

Bug: 157504928, 177079827
CTS-Coverage-Bug: 182275086
Test: atest android.app.time
Change-Id: I0098ab7565b647fb220d39575f0616d2a47bdc89
2021-03-23 16:24:41 +00:00
Jeff DeCew
8548f343e2 Remove Notification.DevFlags
Fixes: 176239013
Test: manual
Change-Id: I1aeed1c79e4a829d8829eb08224f9b21fafc50fe
2021-03-23 13:28:55 +00:00
Jeff Sharkey
9f5392e8b7 Merge changes from topic "nearby-bluetooth-permission-group" into sc-dev
* changes:
  Request new Bluetooth runtime permissions.
  Default grants for "Nearby devices" permission.
  Add BLUETOOTH_SCAN and BLUETOOTH_CONNECT app ops
  Split new NEARBY_DEVICES permissions
  Define new NEARBY_DEVICES permission group
2021-03-23 12:56:30 +00:00
Flavio Fiszman
87eec50482 Show messages count in People Tile
Change-Id: I85b262dda92227cbea2672d9725bda163a5bb42a
Test: manual
Bug: 183382000
2021-03-23 11:25:29 +00:00
Kholoud Mohamed
e7e5563e96 Merge "Properly expose LockTypes constants as systemAPIs" into sc-dev 2021-03-23 10:17:03 +00:00
TreeHugger Robot
baf818032a Merge "Rename "Network slicing" to "Enterprise network preference" in the 5G Slicing API" into sc-dev 2021-03-23 07:49:10 +00:00
TreeHugger Robot
59a8366541 Merge "Improve the documentation of getLastTimeComponentUsed() API" into sc-dev 2021-03-23 06:57:05 +00:00
Jeff DeCew
2a12cfadb4 Merge "New MediaStyle template:" into sc-dev 2021-03-23 02:14:06 +00:00
TreeHugger Robot
358a76f7e4 Merge "Reduce number of maximum clusters" into sc-dev 2021-03-23 02:04:10 +00:00
Jon Spivack
37a7c0aa58 Merge "Support getting AssistContent for recents in Launcher" into sc-dev 2021-03-22 23:57:55 +00:00
Ruslan Tkhakokhov
5db986d793 Merge "Add a field for transport properties to RestoreSet object" into sc-dev 2021-03-22 23:43:24 +00:00
Ruslan Tkhakokhov
3762670bb7 Add a field for transport properties to RestoreSet object
Android Framework needs to know for each RestoreSet provided by
BackupTransport the properties of the transport (e.g. device-to-device
transport, encryption) that was used to obtain the data in the restore
set in question.

Bug: 182986784
CTS-Coverage-Bug: 183441953
Test: atest FullBackupRulesHostSideTest
Change-Id: I07bc2d4eb3837390ea3b0aee769d143ab153335d
2021-03-22 23:42:47 +00:00
Lucas Dupin
1291155196 Reduce number of maximum clusters
Bug: 183392558
Test: manual
Change-Id: I7a28c319e44700f4fc6367cfe6aac615b13b977d
2021-03-22 23:36:44 +00:00
Shuo Qian
48be69a79d Rename "Network slicing" to "Enterprise network preference" in the 5G Slicing API
Test: Treehugger
Bug: 178655595
Change-Id: Ifbe6e5045f85fcf4b5ca2f941605796a788a8a60
2021-03-22 21:43:53 +00:00
Jay Thomas Sullivan
1e8d1a62e0 Add BLUETOOTH_SCAN and BLUETOOTH_CONNECT app ops
This adds a new BLUETOOTH_CONNECT app op, and recycles an old, unused
BLUETOOTH_SCAN app op.

Bug: 181813006
Test: manual
Change-Id: Ie6a3c37532a52675c47a38f13af558932fe0763d
2021-03-22 13:23:39 -06:00
Sally
68820ca613 Update Notification content description API
Test: atest NotificationManagerTest, atest NotificationTest
Bug: 182216039
Change-Id: Idd1a20eea8ef97108a70a4063be5c757cafd5b57
2021-03-22 11:04:20 -07:00
Jeff DeCew
ff165814e1 New MediaStyle template:
* Remove all media-specific color extraction and colorization logic
* Remove all 'large icon' gradienting logic
* Simplify base (headerless) style to use a LinearLayout instead of tweaking margins
* Make compact media layout a tweak of the base (headerless) layout
* Make big_media layout a tweak of the big_base layout
* Fix an unnecessary swooping animation that happened on expand
* Ensure RTL layout also works

Fixes: 172652345
Test: manual testing w/ updated notify2
Change-Id: I11c1494c0ac32aaf3e9d2010560cc8f1d8c50037
2021-03-22 11:13:08 -04:00
Jeff DeCew
d4fcc94923 Merge "Add BigPictureStyle.bigPicture(Icon)" into sc-dev 2021-03-22 14:56:53 +00:00
Riddle Hsu
bee1f1811b Merge "Transfer launch cookie for consecutive launch" into sc-dev 2021-03-22 14:29:05 +00:00
Charles Chen
b661dcbda6 Merge "Enable to listen to WindowContext's config changes" into sc-dev 2021-03-22 12:28:02 +00:00
Bernardo Rufino
04addcb189 Merge "Adjust ACSD APIs" into sc-dev 2021-03-22 11:39:08 +00:00
kholoud mohamed
62f2f6a670 Properly expose LockTypes constants as systemAPIs
Test: N/A
Bug: 182260585
Change-Id: Iaab2608eb206cd41b906dea728f2430efe0560c6
2021-03-22 10:30:57 +00:00
Jeff DeCew
03f22f7af8 Add BigPictureStyle.bigPicture(Icon)
Bug: 177336361
Test: cts + manual
Change-Id: Ie8eebcd749d4a4be46bd0b029e98a82635e5a096
2021-03-20 19:56:30 -04:00
Jeff DeCew
7d1ca13d41 Merge "Minimal change to remove development settings." into sc-dev 2021-03-20 02:34:24 +00:00
Chris Tate
c243f46c6f Merge "DO NOT MERGE - Disallow deletion of channels with FGS notifications" into sc-dev 2021-03-19 20:27:43 +00:00
Branden Archer
30491b1daf Merge "Allow PO to enable security logging on work profile" into sc-dev 2021-03-19 20:24:30 +00:00
Jeff DeCew
6f667c3b5a Minimal change to remove development settings.
Fixes: 183120687
Test: manual
Change-Id: I5632e131b47058ebe25ab21db004eb90498bc299
2021-03-19 15:59:47 -04:00
Julia Reynolds
e363bcdbfa Merge "Be more specific about media statuses" into sc-dev 2021-03-19 19:01:23 +00:00
TreeHugger Robot
06d70ab66d Merge "Allow the system to specify user-force when restricting." into sc-dev 2021-03-19 18:19:37 +00:00
Riddle Hsu
03995ce63d Transfer launch cookie for consecutive launch
Otherwise if the trampoline activity may finish, the cookie is lost.

Bug: 129067201
Test: ActivityMetricsLaunchObserverTests#testConsecutiveLaunchNewTask
Change-Id: I8dcb8706c1ce9878d57ad6a29d6e245119ba957a
2021-03-20 01:55:52 +08:00
Christopher Tate
529052350f DO NOT MERGE - Disallow deletion of channels with FGS notifications
Bug: 156090809
Test: atest CtsAppTestCases:NotificationManagerTest
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Change-Id: I1c2bb78d86f194585d273661cecf3419f51965df
Merged-In: I1c2bb78d86f194585d273661cecf3419f51965df
(cherry picked from commit 39b3890268913bc2dc8b90671d042c0e9b4090d2)
2021-03-19 16:43:32 +00:00
Julia Reynolds
eb1698b1d3 Be more specific about media statuses
Test: atest ConversationStatusTest
Fixes: 183130972
Change-Id: I0d05619bface3ff633c3bf4c02f8b7bf01876fe8
2021-03-19 15:24:16 +00:00
Kweku Adams
071a10efdb Allow the system to specify user-force when restricting.
There are certain situations where user-force is the right reason to
apply when placing an app in the RESTRICTED bucket, but the previous
APIs didn't allow for those situations. Introduce a new one to account
for those scenarios.

Bug: 183103253
Test: atest AppStandbyControllerTests
Change-Id: Ifbdc7de8975f31110224b7c20328f9c53abe68d9
2021-03-19 15:17:33 +00:00
Charles Chen
0783811428 Enable to listen to WindowContext's config changes
This CL overrides registerComponentCallbacks for
WindowContext. Users can use below code snippet
to listen to Configuration changes.
```
Context windowContext = context.createWindowContext(
        display, ...);
windowContext.registerComponentCallbacks(
        new ComponentCallbacks() {
            @Override
            public void onConfigurationChanged(
                    Configuration newConfig) {
                    // Do Something
                }
        });
```

Bug: 181134729
Test: atest WindowContextTests
Test: atest ComponentCallbacksControllerTest

Change-Id: Iff46607bae3c942a96b64dcc97708f3a8c33f23a
2021-03-19 21:56:35 +08:00
Jeff DeCew
a84cafdd58 Merge "Fix an likely ClassCastException in Notification.visitUris" into sc-dev 2021-03-19 00:11:32 +00:00
Shuo Qian
405df3c983 Merge "Add push mechanism in DPM for ConnecitivityService Remove DPM.isNetworkSlicingEnabledForUser" into sc-dev 2021-03-18 22:55:21 +00:00
Shuo Qian
0c3d39fea6 Add push mechanism in DPM for ConnecitivityService
Remove DPM.isNetworkSlicingEnabledForUser

Test: Unit test added but commented; atest DevicePolicyManagerTest
Bug: 178655595
Change-Id: I77d1996f33b017221a14799e71f2df2123f99b32
Merged-In: I77d1996f33b017221a14799e71f2df2123f99b32
2021-03-18 22:15:00 +00:00
Jon Spivack
9b6509f380 Support getting AssistContent for recents in Launcher
The goal is to allow Launcher's Recents View to obtain the AssistContent for the recent activity shown in the view. This is accomplished by:
1. Adding a way to pass an AssistDataReceiver to ActivityTaskManager
2. Adding the 'recents' protection level to the GET_TOP_ACTIVITY_INFO permission so that Launcher can call the new method

Bug: 180157890
Test: Manual (tested getting the AssistContent from Launcher recents on local device)
Change-Id: Ibb3d6b68e2b8f22e79a7b6dbbeb1a3e89d2d6a36
2021-03-18 15:02:30 -07:00
Alex Johnston
255b41f170 Merge "hasKeyPair callable by the cred mng app" into sc-dev 2021-03-18 20:06:17 +00:00
Bernardo Rufino
7bb4bb0304 Adjust ACSD APIs
* ChangeId DROP_CLOSE_SYSTEM_DIALOGS doesn't need to be @TestApi.
* BROADCAST_CLOSE_SYSTEM_DIALOGS permission needs to be @SystemApi given
its protectionLevel

Bug: 181593849
Test: Builds
Test: atest CloseSystemDialogsTest
Change-Id: I6cbbc4a396f920e6cc60299ba827c76158e2e7cf
2021-03-18 18:17:31 +00:00
Kholoud Mohamed
b9f9e6fbac Merge "Add a new broadcast to notify when dpm constants change" into sc-dev 2021-03-18 17:02:55 +00:00
TreeHugger Robot
ab681d10bb Merge "Fix IntDef for DevicePolicyManager.PrivateDnsMode" into sc-dev 2021-03-18 17:01:02 +00:00
Alex Johnston
98bb355acb hasKeyPair callable by the cred mng app
The credential management app can call
hasKeyPair. The provided alias must be
found in the credential management
app's authentication policy.

Bug: 177979648
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest android.devicepolicy.cts.CredentialManagementAppTest
Change-Id: Ib28549fb4e2848ba012df2d154d28f2002ec6e59
2021-03-18 14:18:40 +00:00
Julia Reynolds
d31299c5a8 Merge "Rename notificationchannel constant values" into sc-dev 2021-03-18 14:03:53 +00:00
Julia Reynolds
18417de2c5 Merge changes I5a807bbb,Icc3dd959 into sc-dev
* changes:
  Add an intdef
  Fix contrast issues in channel blocking ui
2021-03-18 13:49:05 +00:00
Kholoud Mohamed
9c8071e410 Merge "Exposed some testAPIs in ActivityManager" into sc-dev 2021-03-18 10:13:04 +00:00
Wei Sheng Shih
4a1f799020 Merge "Remove the timeout which used for cleanup splash screen" into sc-dev 2021-03-18 09:45:39 +00:00
Almaz Mingaleev
d355fee300 Merge "Add time related API to TimeManager." into sc-dev 2021-03-18 09:23:30 +00:00