Commit Graph

14123 Commits

Author SHA1 Message Date
Felipe Leme
e3427ee4c7 Merge "Revert "Use session id to uniquely identidy autofill ids for multi-session."" 2018-09-11 21:20:12 +00:00
Felipe Leme
305fd401db Revert "Use session id to uniquely identidy autofill ids for multi-session."
This reverts commit ba15db8f70.

Reason for revert: broke CTS tests

Change-Id: I8c3997d0944c359edb4adfa2127530be8dea6f21
2018-09-11 18:20:42 +00:00
Felipe Leme
0e4c2079b8 Merge "Use session id to uniquely identidy autofill ids for multi-session." 2018-09-11 17:10:56 +00:00
Felipe Leme
ba15db8f70 Use session id to uniquely identidy autofill ids for multi-session.
This change is need when integrating CustomDescription artifacts (like
CharSequenceTransformation) with SaveInfo.FLAG_DELAY_SAVE, as different
views might have the same autofill id on different activities.

Test: atest CtsAutoFillServiceTestCases:MultiScreenLoginTest
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything

Fixes: 113593220

Change-Id: I7db1df7a56dec7180a2172bb2022b042f115c7b8
2018-09-10 17:03:27 -07:00
Julia Reynolds
a7ba45acb1 Allow apps to proxy notifications for other apps
This will allow apps to delegate posting to persistently
running apps, to decrease the numbers of times apps need to wake up
just to post a notification.

Bug: 111452544
Test: runtest systemui-notification
Change-Id: I1ead239747f2871f222d0ce6a971d1448a0766ad
2018-09-10 15:00:59 -04:00
Eric Sandness
a521deb920 Merge "Block Policies From Device Admin Targetting Q" 2018-09-07 09:07:21 +00:00
Eric Sandness
ca5969d6e0 Block Policies From Device Admin Targetting Q
If a device admin app targets Android Q or above, and it is not a device
owner or profile owner, throw a SecurityException if it attempts to
control the following policies:
  - DeviceAdminInfo.USES_POLICY_DISABLE_CAMERA
  - DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES
  - DeviceAdminInfo.USES_POLICY_EXPIRE_PASSWORD
  - DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD

The set of policies available to a device admin targetting Android P or below is unchanged.

Bug: 111546201
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.android.cts.devicepolicy.DeviceAdminHostSideTestApi24
Test: com.android.cts.devicepolicy.DeviceAdminHostSideTestApi29
Test: com.android.cts.devicepolicy.ManagedProfileTest
Change-Id: Idcd0b4b91ad2fa363535c718928d382c7da054d4
2018-09-05 18:47:42 +01:00
TreeHugger Robot
322a8b214c Merge "Hide Vr2dDisplayFlag annotation" 2018-09-05 15:42:43 +00:00
TreeHugger Robot
73855d4071 Merge "Avoiding potential NPE when dumping to proto." 2018-09-05 01:11:26 +00:00
Kweku Adams
15afdebe38 Avoiding potential NPE when dumping to proto.
Inspired by http://aosp/736453.

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-04 11:57:34 -07:00
Pat Plunkett
74d3fa5f23 Hide Vr2dDisplayFlag annotation
Bug: 113857483
Test: lunch taimen_xr-userdebug; builds; runs
Change-Id: Ide43d77cb3d453586c7df7d4653ed5a23b3e4b21
2018-09-04 10:58:27 -07:00
Bernardo Rufino
74eee1031c Use RemoteCall for quota exceeded in backups
For both key-value and full-backup. This makes the tasks wait for the
quota exceeded call, allowing the agent to complete before being torn
down (as described in bug). Also added a short time-out (3s) in case of
misbehaving agents.

Bug: 68762178
Bug: 110082831
Test: atest FrameworksServicesRoboTests
Test: 1. while true; do atest FullBackupQuotaTest; done
      2. Stop after ~50 executions, verify all succeeded.
Test: 1. while true; do atest KeyValueQuotaTest; done
      2. Stop after ~50 executions, verify all succeeded.
Test: CtsBackupTestCases

Change-Id: Ib582e75a4d317ab53a6df8cb261966a04ef085fb
2018-09-03 13:53:33 +00:00
TreeHugger Robot
f5121c964b Merge changes from topic "kv-refactor-agent-throws"
* changes:
  [KV] Consider throwing BackupAgent a failure
  [KV] Remove states
2018-08-31 21:49:27 +00:00
Bernardo Rufino
6a422d6a61 [KV] Consider throwing BackupAgent a failure
And not a success as it used to be.

Bug: 111051813
Bug: 110082831
Test: atest KeyValueBackupTaskTest
Test: 1. BackupApp throwing in onBackup.
      2. adb shell bmgr backupnow com.google.android.apps.backupapp
      3. Verify logs and that it threw and we did not save backup data for it.
Test: 1. BackupApp not throwing.
      2. adb shell bmgr backupnow com.google.android.apps.backupapp
      3. Verify logs and that data was sent to transport.

Change-Id: Idb7fe298f64786668989c30cdce53355aeef7277
2018-08-31 17:32:26 +01:00
Philip P. Moltmann
7a80e14184 Merge "Factor some RestrictedLockUtils out of SettingLib" 2018-08-31 04:47:28 +00:00
Sergey Vasilinets
91f153401b Merge "Deprecate Activity.onStateNotSaved" 2018-08-30 19:53:09 +00:00
Philip P. Moltmann
4e615e6986 Factor some RestrictedLockUtils out of SettingLib
Also make the new lib only use system-apis.

This allows mainline module to use the new
RestrictedLockUtilsSettingLib.

Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.

Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
2018-08-30 11:59:29 -07:00
Mathew Inwood
98e9ad1645 Add @UnsupportedAppUsage annotations
For all remaining unannotated code.

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:42 +01:00
TreeHugger Robot
6de97650fd Merge "Pass user to InstantAppResolverService methods." 2018-08-30 01:31:29 +00:00
Benjamin Miller
107c06040d Merge "docs: Added reminder that custom CAs aren't automatically trusted by apps." into pi-dev am: 53141c3984
am: 1a96e5c5d3

Change-Id: I4f63ce1c11d9b06955a599a851c237927b8df747
2018-08-29 16:41:42 -07:00
Benjamin Miller
1a96e5c5d3 Merge "docs: Added reminder that custom CAs aren't automatically trusted by apps." into pi-dev
am: 53141c3984

Change-Id: I34c30f2a7e02590d551a0f327ab55cb56a550c4c
2018-08-29 16:33:36 -07:00
Benjamin Miller
8a12c12ad2 docs: Added reminder that custom CAs aren't automatically trusted by apps.
Compact reminder with CTA to read more in Security & Privacy best
practices document.

Test: make ds-docs and inspect generated HTML in the browser.
Bug: 29000858
Change-Id: If74bfd50f85f044214f6db1950351d2f2014e0ae
2018-08-29 17:43:24 +00:00
TreeHugger Robot
6c05ade479 Merge "Throttle requests to ActivityManager.getProcessMemoryInfo()." 2018-08-27 15:37:33 +00:00
Sudheer Shanka
f5e4b2b275 Merge "Add @TestApi to ActivityManager.IMPORTANCE_CANT_SAVE_STATE_PRE_26." 2018-08-27 01:34:53 +00:00
Dianne Hackborn
8c76d91bd2 Throttle requests to ActivityManager.getProcessMemoryInfo().
This is very expensive and needs to run in the system process, we
don't want apps abusing it.

Also don't allow apps to get information about anything but their
own process, unless they have the appropriate privileged permissions.

Bug: 112537519
Test: manual
Change-Id: I01997d6f888341e8eb2afe6a69545dd5be013744
2018-08-26 18:19:07 -07:00
TreeHugger Robot
db3e20f17f Merge "Trigger am and wm presubmit tests for code change under core/java/android/app" 2018-08-25 00:50:33 +00:00
Hai Zhang
bfa4f909d9 Pass user to InstantAppResolverService methods.
This change adds userHandle as a parameter for InstantAppResolverService.
onGetInstantAppResolveInfo() and onGetInstantAppIntentFilter(), so
that Instant Apps can be resolved correctly for secondary users.

Bug: 109674934
Bug: 111436542
Test: manual
Change-Id: I6fed43896d0010fda2f1e6068b6a692a20b359d4
2018-08-24 15:34:11 -07:00
Dan Shi
a0ed8af84b Trigger am and wm presubmit tests for code change under core/java/android/app
The imports setting allows Test Mapping to automatically run presubmit tests
for ActivityManager and WindowManager, when code is changed under
core/java/android/app

Bug: 111302567
Test: local run atest
Change-Id: I5e2c935a56f339c2073426c9b01c7f4b345c16f2
2018-08-24 14:46:17 -07:00
Bill Napier
d7d338f359 Revert "Throttle requests to ActivityManager.getProcessMemoryInfo()."
This reverts commit 1f3b0302fd.

Reason for revert: broke SDK builds.  See ab/4976218

Change-Id: Id532e20eed8e13735a09cca5affc92005b685744
2018-08-24 21:13:13 +00:00
Dianne Hackborn
1f3b0302fd Throttle requests to ActivityManager.getProcessMemoryInfo().
This is very expensive and needs to run in the system process, we
don't want apps abusing it.

Also don't allow apps to get information about anything but their
own process, unless they have the appropriate privileged permissions.

Bug: 112537519
Test: manual
Change-Id: I103a11f8d5b49fd4536795ea52c05de297698cb5
2018-08-24 11:27:50 -07:00
Sergey Vasilinets
0de0eca772 Deprecate Activity.onStateNotSaved
This callback is no longer accurate, because it is basically
onPreResume(), but onSaveInstance isn't related to Pause/Resume
at all. In addition, this callback was added for framework fragments
and they are deprecated

bug: 113134425
Test: no logic changes
Change-Id: I8f961846b52032d9760d5050a2d8ee5ec57c49cd
2018-08-23 19:38:30 -07:00
Sudheer Shanka
be85ed60a8 Add @TestApi to ActivityManager.IMPORTANCE_CANT_SAVE_STATE_PRE_26.
Fixes: 112329019
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases -t \
      android.app.cts.ActivityManagerProcessStateTest
Change-Id: I1c6f1dd9503cde5b11e9d2c3c02841771b665660
2018-08-23 15:02:11 -07:00
Jorim Jaggi
acfabaa32b Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev am: e387ce18d8
am: 2c68abc9fc

Change-Id: I1a0db9f30f7270d49136fa3984dc8d9633ead690
2018-08-22 16:38:27 -07:00
Jorim Jaggi
2c68abc9fc Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev
am: e387ce18d8

Change-Id: I55c32ef69c4bb565376946ce65101f37ef0cce8a
2018-08-22 16:20:32 -07:00
Jorim Jaggi
e387ce18d8 Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev 2018-08-22 23:06:35 +00:00
Adrian Roos
9ee5dff83c BootAnimation: Fix boot animation with hidden cutout
We do this by storing the masking inset in a persistent property.
The boot animation then animates itself to where it would be if that
masking inset were applied, then changes the viewport.

For this to work, we also need to make sure the DisplayManagerService
has the right overlay right at the start.

Bug: 112876936
Test: Hide cutout, then reboot. Verify boot animation is smooth.
Change-Id: I3e988b2340b2e0d2be3939bdc6878704c234ccc8
2018-08-22 21:37:39 +01:00
Jorim Jaggi
d4a386588e DO NOT MERGE Kill most processes when display size changes
am: 2bd9a25007

Change-Id: I43d3ae1ad36e96cd271fa3bc7f951177aa542249
2018-08-22 08:02:04 -07:00
Jorim Jaggi
2bd9a25007 DO NOT MERGE Kill most processes when display size changes
This isn't something apps generally can handle, so we kill all of
them for now.

Test: Change cutout overlay that changes display size
Test: Rotate screen
Bug: 112876936
Change-Id: Ic3b0f1b3ae1e9bd93ac8f2c6952aa093878602b8
2018-08-22 14:22:56 +02:00
Felipe Leme
dde594d606 Merge "Improved AutofillManager and Activity dump() methods:" into pi-dev
am: c9443e3894

Change-Id: I1fc878c1ff3dbd204c619c1514e989399dd51895
2018-08-20 18:38:29 -07:00
TreeHugger Robot
c9443e3894 Merge "Improved AutofillManager and Activity dump() methods:" into pi-dev 2018-08-21 01:18:09 +00:00
Richard Uhler
6ebc2bfb25 Merge changes I5610b42b,Ib7a52bd0 into pi-dev
am: e4e1b4fbec

Change-Id: Ia9eae991b930444a8f957fb405b7166d6ecc2583
2018-08-20 16:35:49 -07:00
TreeHugger Robot
93b48d31ed Merge "[JobScheduler] Typo fix" 2018-08-20 20:51:26 +00:00
Richard Uhler
a6ab55dc11 ResourceManager: Disable APK Assets cache for real.
Test: atest -v google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 111385832
Change-Id: I5610b42b51d3b12cc8587cae6556557362bf67d0
(cherry picked from commit 93090515b9)
2018-08-20 16:05:35 +01:00
Narayan Kamath
77e9589274 ResourceManager: Disable APK Assets cache.
The WeakReference based cache of Assets in use elsewhere in the
process remains unchanged.

Note that this change is larger than it needs to be because it is
an error to create an LruCache of size zero.

There seems to be no measurable difference as measured by the standard
app startup benchmarks.

Test: atest -v google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 111385832
(cherry picked from commit bc95621811)

Change-Id: Ib7a52bd03f6f13cdb76b82abc307d17227c4c1dc
2018-08-20 16:04:21 +01:00
TreeHugger Robot
c5f23bfc69 Merge "ResourceManager: Disable APK Assets cache for real." 2018-08-20 14:27:20 +00:00
TreeHugger Robot
b2484fa070 Merge "Add TestApi for CtsActivityManagerDeviceTestCases." 2018-08-20 13:30:18 +00:00
Richard Uhler
93090515b9 ResourceManager: Disable APK Assets cache for real.
Test: atest -v google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 111385832
Change-Id: I5610b42b51d3b12cc8587cae6556557362bf67d0
2018-08-20 14:11:37 +01:00
Laura Davis
ed3bc12e2a Merge "Docs: Inserted links to relevant guide pages." into pi-dev am: 283f55f7de
am: 6497c5bd21

Change-Id: Ida8426c0ca4f0fd755df2783fb16ea5d9e5e72ad
2018-08-17 16:13:46 -07:00
Laura Davis
6497c5bd21 Merge "Docs: Inserted links to relevant guide pages." into pi-dev
am: 283f55f7de

Change-Id: I1a42ff1b3485e35e152b354039aa5c072e0a1e70
2018-08-17 15:14:38 -07:00
Felipe Leme
4226033998 Improved AutofillManager and Activity dump() methods:
- Print compatibility mode info and activity token on AutofillManager.dump().
- Add --autofill option on Activity so it just dump autofill state.

Also fixed checkstyle import warnings on ActivityManagerShellCommand.

Bug: 112417431
Bug: 112584717

Test: adb shell dumpsys activity top --autofill

Change-Id: Id56b56a5d7e591d5204663a1da1322a15f8ef3aa
(cherry picked from commit b546ca7916)
2018-08-17 14:18:37 -07:00