Commit Graph

16879 Commits

Author SHA1 Message Date
Yanli Wan
0c581ec46d Merge "Add support to start financed device provisioning" 2020-01-11 05:24:17 +00:00
Benedict Wong
d6d1c3aa3e Merge "Add new appop for Platform VPNs" 2020-01-11 02:31:14 +00:00
Yanli Wan
01c9255ec4 Add support to start financed device provisioning
* Add intent action used to trigger financed device provisioning
* Add financed device provisioning precondition check

Bug: 135486391
Test: atest DevicePolicyManagerTest
Change-Id: Id0f65816026cd195481022b6b75c3232996ec6e7
2020-01-10 16:14:57 -08:00
Collin Fijalkovich
88e9459989 Merge "Added verification mode to PropertyInvalidatedCache" 2020-01-10 23:01:56 +00:00
TreeHugger Robot
d8468f82fe Merge "Adding additional listeners (onNotificationVisibilityChanged, onPanelHidden, onPanelRevealed) to NotificationAssistantService." 2020-01-10 20:59:29 +00:00
Rob Carr
57b072545f Merge "Introduce TaskOrganizer" 2020-01-10 20:27:27 +00:00
Ruchir Rastogi
3b0b4dff97 Merge "Migrate puller registration to StatsManagerService" 2020-01-10 19:00:05 +00:00
Kholoud Mohamed
a69be11929 Merge "Give INTERACT_ACROSS_PROFILES parity with _USERS for bindServiceAsUser API" 2020-01-10 18:54:02 +00:00
Benedict Wong
3eb9520d1a Add new appop for Platform VPNs
This change introduces a new appop, ACTIVATE_PLATFORM_VPN, that is a
subset of the ACTIVATE_VPN appop. VPN apps that have been granted the
more dangerous ACTIVATE_VPN appop should be allowed to use platform
VPNs, as they are more restricted, and safer. However, the opposite
must not be true.

Bug: 144246835
Test: Compiles, FrameworksNetTests passing
Change-Id: I609e87e688432f957751058b09f350fa641753d7
2020-01-10 18:05:29 +00:00
TreeHugger Robot
0df353738f Merge "Add support for conversation notification channels" 2020-01-10 17:46:58 +00:00
Julia Reynolds
0f76734e36 Add support for conversation notification channels
Bug: 137397357
Test: atest, cts
Change-Id: I3d8f9ec2f318ba8a16e6b82f656884cf142adf9c
2020-01-10 16:01:03 +00:00
TreeHugger Robot
f9ace3f8aa Merge "Add can interact/request to interact across profiles APIs" 2020-01-10 04:25:31 +00:00
Ruchir Rastogi
13b7796a64 Migrate puller registration to StatsManagerService
The code path to register and uregister pullers now goes through
StatsManagerService as opposed to StatsCompanionService. Pullers are
also now cached in StatsManagerService.

Test: m -j
Test: atest GtsStatsdHostTestCases (passes even when the RVC check is
removed from relevant tests)
Bug: 147010937
Change-Id: I6549a41e2059c5fc9e57d861b751760ef165f879
2020-01-09 14:56:37 -08:00
Robert Carr
8a2f913ac4 Introduce TaskOrganizer
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
        1. The interface itself for implementation by SysUI
        2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.

Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
2020-01-09 13:04:18 -08:00
Collin Fijalkovich
0dce8bb6cf Added verification mode to PropertyInvalidatedCache
Created a compile-time flag VERIFY that when enabled will compare
any answer returned out of the cache with the true server response.
If the answers differ and the invalidation nonce has not changed,
the cache will log which query induced the response.

Bug: 146018074
Test: Manually flashed and verified that the cache captures invalid
responses.

Change-Id: I716b6aad5c4dac975e96fa05f0e18829f76c8636
2020-01-09 09:18:17 -08:00
kholoud mohamed
946df39c29 Add can interact/request to interact across profiles APIs
Add CrossProfileApps#canRequestInteractAcrossProfiles,
and CrossProfileApps#canInteractAcrossProfiles public APIs.
This provides apps the ability to check if they can interact across profiles,
or can they request that from the user if not.

BUG: 136249261
Test: in progress

Change-Id: Ifd561d5d5efcd167e24a5f05c22496d1fe9c81fc
2020-01-09 16:01:45 +00:00
TreeHugger Robot
b22fc1bea4 Merge "Use START/STOP messages to update visibility" 2020-01-09 14:30:37 +00:00
kholoud mohamed
67ac7c6760 Give INTERACT_ACROSS_PROFILES parity with _USERS for bindServiceAsUser API
INTERACT_ACROSS_PROFILES should work as a replacement for INTERACT_ACROSS_USERS so we don't have to give privileged system components a permission that is more powerful than is necessary.
Javadoc and annotations of the bindServiceAsUser API will be modified in a subsequent CL.
Unlike INTERACT_ACROSS_USERS, calling an API for a user in a different profile group will throw a SecurityException.

BUG: 140807471
BUG: 136249261
Test: atest ContextCrossProfileHostTest
Test: tested locally that granting the permission allows access to
bindServiceAsUser

Change-Id: I2878067bb2369d26a9ac5504ddd8c0e753f67898
2020-01-09 12:04:04 +00:00
Jeff Sharkey
b8c30b3449 Merge changes from topic "jan7"
* changes:
  Respond to API council feedback.
  Final push to build against SDK.
2020-01-09 06:11:04 +00:00
Andrii Kulian
b9faa03b90 Use START/STOP messages to update visibility
Activity visibility messages simply move the activity to STOPPED or
STARTED state. We can use the lifecycle messages to do the same and
simplify the logic/remove duplicated code.

This CL also removes the option to send STOP message without making
the client invisible and actually calling onStop(). This option
caused a mismatch of the state between server (STOPPED) and client
(PAUSED). Also, in cases when the device was going to sleep, STOP
message was always followed by SLEEP message, which called onStop()
anyway.

Bug: 137329632
Bug: 129750406
Test: AM/WM CTS and unit tests
Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
2020-01-08 15:29:57 -08:00
Automerger Merge Worker
655ad4a8f5 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975 am: e219088375
Change-Id: Ie4ede0037ee0c209e31c572c805948a17a83a6e4
2020-01-08 22:41:08 +00:00
TreeHugger Robot
22f2eb7208 Merge "Update Add/Remove Configuration" 2020-01-08 22:28:35 +00:00
Automerger Merge Worker
e219088375 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975
Change-Id: Id3ea80c30e149588a6d97f02df978f258dda3495
2020-01-08 21:13:09 +00:00
Hall Liu
f428f58080 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" 2020-01-08 20:54:48 +00:00
Eran Messeri
76a011ba2a Merge "DPM: Add method for Organization-owned device detection" 2020-01-08 19:35:46 +00:00
Neil Fuller
540f003086 Merge "Rename android.util.TimestampedValue to android.os" 2020-01-08 19:35:27 +00:00
Jeffrey Huang
94eafe74a3 Update Add/Remove Configuration
Test: GTS Tests
Bug: 146383400
Change-Id: Ibcd6802468fa3be3ffde4357b37060711deff9b3
2020-01-08 10:52:25 -08:00
Jeff Sharkey
197fe1f90f Final push to build against SDK.
The bulk of the work needed to get MediaProvider building against
the "system_current" SDK surface has been slowly merged over the
last few months, and this change makes the last few adjustments.

This adds a new StorageVolumeCallback which is simpler version of
StorageEventListener that simply delivers the changed StorageVolume.

Move DownloadManager logic into a onMediaStoreDownloadsDeleted()
method which hides the implementation details of how the OS connects
with that implementation.

Make local copies of some ExifInterface parsing logic; they could
be added to the androidx version in an unbundled release.  Make a
local copy of RedactingFileDescriptor, since it's only needed for
the next few weeks until FUSE is globally enabled.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ib416eb8724781bdd234c8b7d728dee8b695ad6ac
2020-01-08 11:44:28 -07:00
Jeffrey Huang
df1b6de06c Merge changes Id640e568,I26348987,I9da3526d
* changes:
  Update getReports
  Update getStatsMetadata
  Update getRegisteredExperimentIds
2020-01-08 18:06:42 +00:00
Neil Fuller
d159015e54 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
2020-01-08 17:00:34 +00:00
Eran Messeri
a1015c8c95 DPM: Add method for Organization-owned device detection
Add a method to the DevicePolicyManager for finding out if the device is
an organization-owned device with a work profile (i.e. it has a work
profile but the work profile was created during the provisioning flow).

This method is currently available for privileged callers (system API),
since other methods (e.g. isDeviceManaged) are also restricted.

NOTE: Addition of GTS tests is pending final decision on whether this
will be public API or not.

Bug: 143518237
Bug: 144978467
Bug: 147340575
Test: atest FrameworksServicesTests:DevicePolicyManagerTest#testIsOrganizationOwnedDevice
Test: CTS tests that are on hold for now.

Change-Id: I26ce1de10844dc297924427a6d46df9208931ab0
2020-01-08 16:02:44 +00:00
TreeHugger Robot
aff43dbc03 Merge "Add pre-dump for input ANR" 2020-01-08 05:28:43 +00:00
Srinivas Paladugu
edfdd4153a Merge "Add new dpm api to disable user control over apps" 2020-01-08 01:32:55 +00:00
Jeffrey Huang
04f948b450 Update getReports
Test: GTS Tests
Bug: 146383638
Change-Id: Id640e568d41c5f30e7c42a06addfba644061c706
2020-01-07 17:15:52 -08:00
Jeffrey Huang
9613a973a2 Update getStatsMetadata
Test: GTS Tests
Bug: 146384074
Change-Id: I263489874616d4ed5d16f2796fa74c740059a35a
2020-01-07 17:15:52 -08:00
Jeffrey Huang
80c9a975d7 Update getRegisteredExperimentIds
Bug: 146384076
Test: GTS Tests
Change-Id: I9da3526d97d5adef423c69366f50fac59a1d6247
2020-01-07 17:15:51 -08:00
Alex Mang
509e55481f Adding additional listeners (onNotificationVisibilityChanged,
onPanelHidden, onPanelRevealed) to NotificationAssistantService.

Bug: 147149509
Test: atest NotificationManagerServiceTest#testOnPanelRevealedAndHidden,testStats_updatedOnVisibilityChanged
Change-Id: If17070677d01b00d7c3cdda9a0e9d3e8f47f9062
2020-01-07 12:07:24 -08:00
TreeHugger Robot
e4f93070ed Merge "Collect historical appops by feature" 2020-01-07 19:20:21 +00:00
Riddle Hsu
1286b571ff Add pre-dump for input ANR
If an input ANR is caused by the lock of window manager
or activity manager is held for a long time, we usually
get an unhelpful stack traces because the ANR reporting
is also blocked by the locks.

The pre-dump checks if the locks cannot be acquired within
a timeout, then dump the stack trace at the beginning of
notifying ANR.

Bug: 144987910
Test: 1. Launch a simple app.
      2. Set break-points inside the lock of window manager
         and activity manager.
      3. Press back key and wait 5s.
      4. Check the path /data/anr/ in device. There should
         be a filename ends with "_pre".

Change-Id: I9831a31e17661d822572c73e64fe9980fe018b22
2020-01-07 17:30:54 +00:00
TreeHugger Robot
e131981931 Merge "Log to SecurityLog if camera is disabled by admin" 2020-01-07 14:00:28 +00:00
Kholoud Mohamed
b848a1017c Merge "Add default cross-profile package APIs" 2020-01-07 11:29:09 +00:00
Kholoud Mohamed
ae9545e102 Merge "Add INTERACT_ACROSS_PROFILES appop" 2020-01-07 11:28:18 +00:00
Automerger Merge Worker
8303c9def2 Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756 am: ef100e45fe
Change-Id: Ie4ab2ecaa0778fa6ff7d75e5677dfb4bed1d443d
2020-01-07 10:45:04 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Jeffrey Huang
89e95d5b5f Merge changes I1510e44b,I9313299e,I7df5c644
* changes:
  Update setBroadcastSubscriber
  Update activeConfigsChangedBroadcast
  Creating PendingIntentRef
2020-01-07 02:18:22 +00:00
Automerger Merge Worker
2d3c66da00 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7 am: cccf7a2b84
Change-Id: Id3b15d9d4d58235034405c85b7e10fc42f3e4172
2020-01-07 01:12:52 +00:00
Automerger Merge Worker
cccf7a2b84 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7
Change-Id: Icee2c41d635883c6b9ede6bf6ec3bbfda22cdc1f
2020-01-07 01:01:54 +00:00
Hall Liu
2ada7fbac2 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" 2020-01-07 00:36:51 +00:00
Jeffrey Huang
4f2e6bd68d Update setBroadcastSubscriber
change #setBroadcastSubscriber and #unsetBroadcastSubscriber
to avoid using intentsender

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I1510e44bcdf49b579fd49f51081c6a40618039fa
2020-01-06 16:25:41 -08:00