Commit Graph

13980 Commits

Author SHA1 Message Date
TreeHugger Robot
95e4e67dc6 Merge "Docs: generateKeyPair() can't be called from the main thread." 2018-07-03 08:32:23 +00:00
Winson Chung
8f54a7c515 Merge changes Ibae2de51,I1d6718d9
* changes:
  Allow share/edit screenshot actions from lockscreen
  Prevent clobbering of activity options bundle when merging
2018-07-02 21:04:39 +00:00
TreeHugger Robot
f574d538c1 Merge "Add a package declaration to RulesState" 2018-07-02 19:28:22 +00:00
TreeHugger Robot
ce77407144 Merge "StrictMode to catch storage while locked." 2018-06-30 22:04:26 +00:00
Winson Chung
3743d28ec9 Prevent clobbering of activity options bundle when merging
- RemoteViews specify an ActivityOptions when calling startIntentSender()
  (for click handling), but if the PendingIntent being started also has an
  ActivityOptions, the merging of the two options will fail since the
  ActivityOptions properties are always written into the bundle (regardless
  of whether they are actually set).  Instead, only write non-default
  values to the bundle (the defaults will be read out if not set when
  restoring the options from the bundle anyways).

Bug: 72459081
Test: atest FrameworksServicesTests:ActivityOptionsTest

change-id: i1d6718d9db4b3f7056412c5b4c5347a19ffa7c09
2018-06-29 17:36:16 -07:00
TreeHugger Robot
e26fae649b Merge "Moved more stuff from ActivityManagerService to ActivityTaskManagerService (11/n)" 2018-06-30 00:21:40 +00:00
Wale Ogunwale
f673393b93 Moved more stuff from ActivityManagerService to ActivityTaskManagerService (11/n)
Moved more stuff related to activities out of the current service to the new one.

Bug: 80414790
Fixes: 110988007
Test: Existing tests pass.
Change-Id: Iceed1da8a7441a26d11efebc6d9f692fd053bc7f
2018-06-29 23:51:01 +00:00
Jeff Sharkey
dd02e33417 StrictMode to catch storage while locked.
When an app starts becoming Direct Boot aware, it can be difficult
to track down all the places they're reading data from credential
protected storage.

When a user is locked, credential protected storage is unavailable,
and files stored in these locations appear to not exist, which can
result in subtle app bugs if they assume default behaviors or
empty states. Instead, apps should store data needed while a user
is locked under device protected storage areas.

Bug: 110413274
Test: atest cts/tests/tests/os/src/android/os/cts/StrictModeTest.java
Change-Id: Ia390318efa6fefda8f10ac684d0206e67aa1d3dc
2018-06-29 11:41:00 -06:00
Benjamin Miller
2a8f129c2a Docs: generateKeyPair() can't be called from the main thread.
Bug: 110194933
Test: make ds-docs with visual inspection of generated HTML
Change-Id: I5f7839cbf57d9150ad4c9a9c4ac943064fb1f6c0
2018-06-29 08:07:47 +00:00
Bernardo Rufino
62863825e0 Fix file matching w/ full-backup rules xml
Documentation is pretty vague:
https://developer.android.com/guide/topics/data/autobackup#XMLSyntax.

But there were a couple of issues:
* It was prematurely returning false without consuming the rest of the
  includes (cause of the bug linked).
* It was using string comparison for checking if a file is in a
  directory, which ended up flagging directories such as "a/b" as
  containing files "a/b.txt".

Reviewers,

* Please, pay full attention to test cases.
* Since this is code move + code change, set diff as 2..latest to check
changes to the function.

Bug: 110720194
Test: atest BackupUtilsTest
Test: Backup and restore app w/ multiple directory includes, verify
      everything restored

Change-Id: Ic0fea43156ce8fb641af69ae73679289a20c291c
2018-06-29 07:18:26 +00:00
Winson Chung
1241652d8a Merge "Ensure PiP test apis are marked as TestApi" 2018-06-29 03:13:25 +00:00
Winson Chung
37b99ba2e4 Ensure PiP test apis are marked as TestApi
Bug: 77533294
Test: atest CtsAndroidAppTestCases:PictureInPictureParamsBuilderTest
Change-Id: Icbcea8cf9d7e49db7ebcc1ce676b43722f75b7f4
2018-06-28 15:42:06 -07:00
Jeff Sharkey
ed71f10907 Merge "Give StrictMode more bits to work with." 2018-06-27 22:33:07 +00:00
Kevin Chyn
02bcebede4 Merge "6/n: Have FaceService extend BiometricService" 2018-06-27 22:09:01 +00:00
Kevin Chyn
a56dff7339 6/n: Have FaceService extend BiometricService
In the Service layer, this change is pretty much the same as ag/4340638.
FingerprintService already extends BiometricService which contains all
of the common code. FaceService now does the same after this change.

Updated the Manager layer to use the infrastructure added in P, namely
  - Private APIs for BiometricPrompt
  - Removed FaceManager#CryptoObject, use biometrics/CryptoObject directly
  - Few other BiometricAuthenticator things

Bug: 110387294

Test: enrolling FP still works
Test: removing FP still works
Test: changing FP name persists across reboots
Test: enumerating still works (extra framework fp, extra hw fp)
Test: keyguard still receives lockout reset callbacks

Change-Id: I2195b08e28d024a120df56fe87b0dd4f9b96505a
2018-06-27 11:31:03 -07:00
Peter Visontay
2c6b6c4962 Fix broken links in the Javadoc of Activity.requestPermissions().
Test: none
Change-Id: I43b36394d4b50882edbcc057610b609cabf34f9a
2018-06-27 10:42:15 +00:00
Christopher Morin
40aea87fa3 Merge "OOM score management" 2018-06-27 02:39:05 +00:00
Chris Morin
af5451f0ac OOM score management
Add 2 additional attirubte |isFocused| and |lastActivityTime| in
ActivityManager.RunningAppProcessInfo and pass them to Chrome via IPC
so Chrome can better prioritize ARC processes.

Bug: 29576205
Test: Ensure new process information is passed to Chrome.

Change-Id: Ic88d5fca336f03bd6426e65f964236130bb83fb6
2018-06-26 15:41:40 -07:00
Jeff Sharkey
3ac2a43455 Give StrictMode more bits to work with.
We're almost out of bits, and we don't really need to smash both
thread and VM policy into the same 32-bit value, so use the lower
16-bits for each policy type and the upper 16-bits for penalty.

ActivityManager is only consulting the penalty bits, so we can
remove getViolationBit() and switch CTS over to doing instanceof
checks.

Bug: 110413274
Test: atest cts/tests/tests/os/src/android/os/cts/StrictModeTest.java
Change-Id: I760e6a28f56da66dc75b7df9daf2167ff5bdff50
2018-06-26 14:12:14 -06:00
Jeff Sharkey
c59a5e7e0b StrictMode to catch implicit Direct Boot matching.
When an app starts becoming Direct Boot aware, it can be difficult
to track down all the places they're implicitly relying on
PackageManager filtering behavior.

For example, if the current Launcher isn't Direct Boot aware, we
hide it until the user is unlocked, which could confuse other Direct
Boot aware apps into thinking it had been uninstalled, which could
cause data loss.

This change helps apps track down places where they're implicitly
relying on the automatic filtering; they should instead carefully
choose a combination of MATCH_DIRECT_BOOT flags to decide on the
explicit matching behavior they want.

To implement this, we partially migrate the updateFlags() methods
out into ApplicationPackageManager, since the checking needs to
happen on the client side to correctly report StrictMode
violations.  We don't currently mutate the flags, but we retain
the naming to keep that door open in the future.

Test: manual
Bug: 110413274
Change-Id: Iff6feba19da81ea1b4eeb3af821c3bdfbd9bf17c
2018-06-26 13:20:37 -06:00
Kazuki Takise
dd7b69d3c5 Merge "Position stack at top when always on top flag is set" 2018-06-26 04:14:41 +00:00
Neil Fuller
4d9f7a8bc3 Merge "Minimum viable TimeZoneDetectorService" 2018-06-25 18:47:39 +00:00
TreeHugger Robot
1248d0db95 Merge "Introduced WindowProcessController/Listener (10/n)" 2018-06-23 05:52:22 +00:00
Wale Ogunwale
9e4f3e077f Introduced WindowProcessController/Listener (10/n)
One heavy dependence between the current AMS service and activities
is process management which is heavy affected by activities and their
current state. We introduce WindowProcessController and WindowProcessListener
objects as a structured way for the process changes in AM package to
be communicated to the WM package and WindowProcessListner for activity
changes in the WM package to the communicated back to the AM package.
The ProcessRecord object in AM will own the WindowProcessController object
and also implement the WindowProcessListener.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I9e96e841b0f95e99a597cb4629fa5d2fe45760b6
2018-06-22 14:26:24 -07:00
TreeHugger Robot
abe78cd313 Merge changes from topic "biometrics-face"
* changes:
  5/n: Move FaceService to biometrics directory
  4/n: Add face authentication framework
2018-06-22 18:44:27 +00:00
TreeHugger Robot
49585937c6 Merge "Get WallpaperInfo for current user" 2018-06-22 18:14:19 +00:00
Julia Reynolds
aca215a67a Improve backup and restore for empty sounds
Test: runtest systemui-notification
Change-Id: Iab2eebb0da8163f520af95c2ad5fd8f35333a9d5
Fixes: 109777940
2018-06-22 09:35:10 -04:00
Kazuki Takise
f85197be4a Position stack at top when always on top flag is set
When always on top is set, the position of the stack must be
changed in ActivityDisplay and in DisplayContent. This CL
introduces this logic in ActivityStack.setAlwaysOnTop().

Bug: 69370884
Test: go/wm-smoke
Test: atest DisplayContentTests
Test: atest WindowContainerTests
Change-Id: Ie7efe175175a4db209a6b0f3476d9dfc27432df5
2018-06-22 16:05:16 +09:00
Gilad Bretter
cb51b8b847 4/n: Add face authentication framework
This change is cherry-picked and rebased from AOSP
https://android-review.googlesource.com/c/platform/frameworks/base/+/660242

Add face recognition as an identification method, following fingerprint
design. Unlike fingerprint, only one face template can be enrolled per
user, and a vendor message is passed from the HAL all the way to the
client callback to allow GUI indication about the enrolled face
templates.

Add FaceAuthenticationManager and FaceService.
Add face authentication capability to TrustManager and Keyguard.
Modify TrustManager and KeyguardUpdateMonitorCallback fingerprint code
to support generic biometric method to eliminate duplications.
Add BiometricSourceType enum to keep track of the specific biometric
method.

Test: biometric authentication still works on the device

Fixes: 110385761

Change-Id: I5d04fe69a112c13d3ef7330b9c08c146e36c5335
Signed-off-by: Gilad Bretter <gilad.bretter@intel.com>
2018-06-21 17:00:07 -07:00
Lucas Dupin
f132a8d7e1 Get WallpaperInfo for current user
Secondary user's WallpaperInfo would always be null otherwise.

Test: manual, switch between users with different live wallpapers
Change-Id: I32d5e04281aa38b00f5350569ef86b5d74de8f07
Fixes: 110275658
2018-06-21 15:57:07 -07:00
Wale Ogunwale
a6191b4fa1 Moved more stuff from ActivityManagerService to ActivityTaskManagerService (9/n)
Moved more stuff related to activities out of the current service to the new one.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I16863dd977bf09136cc23b0ab3aa197c613879ea
2018-06-21 15:11:21 -07:00
Neil Fuller
7fb88c3928 Minimum viable TimeZoneDetectorService
This is a do-nothing TimeZoneDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeZoneDetectorServiceTest

Test: build / boot
Test: See above
Change-Id: I565fb5dd2f18b7aac2e5779d346bfe69e9da02af
2018-06-21 10:28:47 +01:00
Kazuki Takise
5e66d5d963 Merge "Make sure mFlags is synced properly in WindowConfiguration" 2018-06-21 00:46:07 +00:00
Irina Dumitrescu
24ed35cd83 Add dpm force-network-logs command to force network logs retrieval.
This is useful because logs are batched every 1.5-2hrs if there are
not enough logs to fill up a batch. The command is throttled at
10 seconds as a spam prevention measure.

Bug: 62251154
Test: in adb shell run dpm force-network-logs. Observe a new batch
being created in the phone directory
/storage/emulated/0/Android/data/com.afwsamples.testdpc/files/. Also
observe a fresh batch is being displayed on the phone in the TestDPC
app, under "Retrieve network logs".
Change-Id: I5ff9d5c78497ea81533b5248816b4d6e160d338f
2018-06-20 16:23:58 +01:00
Kazuki Takise
4e7e789be2 Make sure mFlags is synced properly in WindowConfiguration
The previous logic doesn't have the logic to distinguish "off" and
"undefined" for mFlags. This CL solves this issue by introducing
a variable dedicated to always on top. See b/110383970 for more
background.

Bug: 110383970
Test: atest WindowConfigurationTests
Test: go/wm-smoke
Change-Id: Ia4fe8f43e5f6d65d68b1257951b1770a49af35bc
2018-06-20 15:10:06 +09:00
Kazuki Takise
661e012f51 Merge "Add always on top feature support" 2018-06-18 08:55:09 +00:00
Kazuki Takise
148d00ac93 Add always on top feature support
Add basic functionalities for always on top feature.

- Add a new flag to WindowConfiguration to represent a task wanting to
be on top.
- Update the logic on changing the z-order of windows to make sure
always on top windows are placed above other windows.

Bug: 69370884
Test: go/wm-smoke
Test: atest DisplayContentTests
Test: Used ArcCompanionLibDemo app to verify that when always-on-top is
      set, the app is above the other Android apps and Chrome windows.

Change-Id: Ie8edeb8ceeed0b9ec154b6031ed6cbe7ecc65b12
2018-06-18 14:10:31 +09:00
Wale Ogunwale
d0412b339b Switched ActivityRecord.service to ActivityTaskManagerService (5/n)
Objects that contain or represent activities like ActivityRecord can
no longer rely on ActivityManagerService as it is going to be in a
different package.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I7eabc9b80e494367d79ff7452c88ba82ff216bcd
2018-06-17 18:11:42 -07:00
Wale Ogunwale
6767eaee94 Split internal interface activities from current AM interface (3/n)
3rd step in unifying the window hierarchy that is currently split
within AM and WM packages. We separate the the internal interface used
to communicate within system server dealing with activities and their
containers (tasks, stack, display) from the rest of AM internal
interface.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: Idad77721c1fe10621b9be5dced42a0a11f0183e5
2018-06-15 08:43:22 -07:00
Dianne Hackborn
1c4cc2d182 Merge "Expose new AppOps API that we had to leave hidden in P." 2018-06-14 23:42:46 +00:00
Xiangyu/Malcolm Chen
e448504530 Merge "Have proper permission check in getConfigForSubId" 2018-06-14 22:44:55 +00:00
Dianne Hackborn
f0c322a9db Expose new AppOps API that we had to leave hidden in P.
Now's the time!

Test: manual
Bug: 109754053
Change-Id: I06c9428b5a133be574061410b4bb7d9c589c1b7c
2018-06-14 11:44:38 -07:00
Android Build Merger (Role)
5e9763d36c Merge "Merge "Remove internal ApnSetting." into pi-dev-plus-aosp am: 1969c54ae2" 2018-06-12 22:57:51 +00:00
Pengquan Meng
0885b2d337 Merge "Remove internal ApnSetting." into pi-dev-plus-aosp
am: 1969c54ae2

Change-Id: Ifaa873daa4bf60e5ddc9b8acef8b826ac787582a
2018-06-12 15:55:11 -07:00
Pengquan Meng
1969c54ae2 Merge "Remove internal ApnSetting." into pi-dev-plus-aosp 2018-06-12 21:38:22 +00:00
Wale Ogunwale
04d9cb5f40 Moved some activities implementation to ActivityTaskManagerService (2/n)
Second step in unifying the window hierarchy that is currently split
within AM and WM packages. We move some of the API implementation for
activities from ActivityManagerService.java to
ActivityTaskManagerService.java.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790

Change-Id: I23dcd924493d8ad1e0b6e3a55386fd72b0146605
2018-06-12 13:38:39 -07:00
TreeHugger Robot
6006f76ad7 Merge "Split interfaces and service for activities from current AM interfaces (1/n)" 2018-06-12 18:18:48 +00:00
Neil Fuller
415585f2a5 Merge "Simple pass-through TimeDetectorService"
am: cb749e2e50

Change-Id: Ic2e3d3c3f9181ef4054f599baf4ac086ec21d8bd
2018-06-12 11:17:51 -07:00
TreeHugger Robot
15f3581ca0 Merge "Use disableForUser in StatusBarManager" 2018-06-12 16:06:34 +00:00
Jeff Sharkey
273193b16d Merge "Annotate methods with SET_TIME and SET_TIME_ZONE." 2018-06-12 16:00:20 +00:00