Commit Graph

11446 Commits

Author SHA1 Message Date
Christine Franks
361b825c0d Support demo mode and demo users
Bug: 62712426
Test: run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageEphemeralUser
and
run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest# \
testCreateAndManageEphemeralUserFailsWithoutSplitSystemUser
and
runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest \
frameworks-services
Change-Id: I77a71a994fe0f4f1f8c5df7c4ccf493aafa8fefe
2017-07-10 17:49:42 -07:00
Julia Reynolds
c65071d625 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev 2017-07-10 16:55:01 +00:00
Julia Reynolds
6ad0aecf99 Limit the number of notis an app can enqueue
In addition to the number they can post. Also decrease
the number of posts per second to 5, but allow finished
progress notifications through.

Fixes: 63173849
Fixes: 63167456
Test: runtests systemui-notification & simultaneously
downloading 5 files.
Change-Id: I0c8ea35b3d9d38b000ea5fe383515e1d5a26bac7
2017-07-10 09:42:24 -04:00
Lucas Dupin
4bd24f36c5 Add theme style flag to WallpaperColors
Theme colors should always be the same in sysui and launcher.
We're now sharing a hint HINT_SUPPORTS_DARK_THEME, to make sure
we're never out of sync.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63140091
Change-Id: Ibd196f540d77269df377804b0f4d4d0d20820067
2017-07-07 14:36:45 -07:00
Julia Reynolds
e4101089bb Merge "Allow setup apps to colorize notifications." into oc-dr1-dev 2017-07-07 19:24:37 +00:00
Andrew Solovay
465810c895 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I1c25c17f1f73e4006e3b0fa9479d5b0563c6be98
2017-07-07 19:09:39 +00:00
Julia Reynolds
d71c5a9426 Allow setup apps to colorize notifications.
Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
2017-07-07 17:22:43 +00:00
TreeHugger Robot
b1ab0ff21e Merge "Hide all color hints references" into oc-dr1-dev 2017-07-07 00:12:08 +00:00
TreeHugger Robot
2de66f7be1 Merge "Don't synchronize inside getWallpaperColors()" into oc-dr1-dev 2017-06-29 22:26:34 +00:00
Andrew Solovay
4d2089c58a docs: Described why ProgressDialog is now deprecated.
Per feedback from DevRel, devs should avoid ProgressDialog because
using a modal dialog to show progress is a bad user experience.
Updating the ProgressDialog javadocs to say this; there's a separate
CL (http://cr/160568896) to make a similar note in the Dialogs API
guide.

Doc is staged to:

http://go/dac-stage/reference/android/app/ProgressDialog.html

Test: make ds-docs
Bug: 37565313
Change-Id: I189732fdda4532f248861e3f3d077f743f6387de
2017-06-29 14:01:43 -07:00
Santos Cordon
627a68f852 Add ability to turn off VR virtual display functionality.
Add flag to enable/disable virtual displays via the existing
setDisplayProperties API. This makes it possible for the VR system
to turn off virtual displays if necessary after we ship.

Bug: 62546364
Test: Run 'adb shell vr enable-virtual-display [true|false] to toggle while 2d in 3d
runs.

Change-Id: Iae029be501d61189fced981dbc554e984fa7ed4b
2017-06-29 19:01:39 +00:00
Robert Carr
da72cb368e Merge "Disable requestVisibleBehind." into oc-dev
am: e33c33e38a

Change-Id: I29e5507d716e19060d4c0578d4b4df3bcfa30069
2017-06-29 02:15:32 +00:00
TreeHugger Robot
e33c33e38a Merge "Disable requestVisibleBehind." into oc-dev 2017-06-29 00:17:19 +00:00
Lucas Dupin
bdffdd52fa Hide all color hints references
Change-Id: I9714bf8a982e0f58cab7e707129e81ee3d8cf5db
Fixes: 63096109
Test: make
2017-06-28 09:49:47 -07:00
Christopher Tate
dbf4a9c274 Don't synchronize inside getWallpaperColors()
Reading the current wallpaper's palette doesn't involve any state
inside the WallpaperManager instance, so there's no reason to
apply synchronization in the first place.  By doing so we were
inducing a great deal of lock contention, since the system side
of the operation can sometimes take a long time to execute.

Bug 63065764
Test: manual

Change-Id: I6f5f67a0819da23245a4ad5334f0942011467f7c
2017-06-27 15:27:36 -07:00
Robert Carr
8661c5e519 Disable requestVisibleBehind.
As there is no caller for the SystemAPI convertToTranslucent, there is no situation
where requestVisibleBehind will actually result in the activity becoming
visible behind. However we have bugs in the requestVisibleBehind code-path,
so rather than fix them...it seems better to just prevent ourselves from
running in to them. Full deletion of the code-path is scheduled for post-O
branches.

Change-Id: I6e7c79e036986564d2d443a603e63c341de23057
Fixes: 62512584
Test: Repro from bug. go/wm-smoke.
2017-06-27 13:46:14 -07:00
Bryce Lee
943794bb70 Merge "Add aborted start result." into oc-dev
am: 8796c20dae

Change-Id: I849ea5bfce87bd6a9264308e40242f6a2026713c
2017-06-27 04:20:35 +00:00
Bryce Lee
f9d4954f30 Add aborted start result.
Previously, we were returning START_SUCCESS when ActivityStarter
aborted launching the activity. This hides this activity and makes it
harder to debug.

This CL adds a new start result type to capture this internally.

Bug: 38121026
Test: manual
Test: go/wm-smoke
Change-Id: I97699b22b1eff476724c48db0c29daa0566ad280
2017-06-26 16:27:32 -07:00
Richard Uhler
a178205e8b Fix bug in reporting SwapPss in dumpsys meminfo.
Bug: 29875093
Test: Run dumpsys meminfo -a, verify SwapPss adds up and is non-zero
      for dalvik and native.

Change-Id: I79d0b6a59bf5f4e73f75f0b9540ec0fcc9e23b02
2017-06-26 06:34:04 +00:00
Ying Xu
05ce703c87 Merge "Add flag to wipe eUICC data" into oc-dr1-dev 2017-06-23 20:52:56 +00:00
yinxu
f4f9cec234 Add flag to wipe eUICC data
Add a new flag in the DevicePolicyManager so that we can Use
EuiccManager#eraseSubscriptions(PendingIntent) to erase all the carrier data
from eUICC chip if the user choose to "ERASE" from the Android device manager.

Bug: 37277944
Test: E2E
Change-Id: Ia78090a00d956c645725be4fd591e02ded8ec467
2017-06-23 10:56:55 -07:00
Seigo Nonaka
b7773ce875 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
(cherry picked from commit 6d6cd68660)
2017-06-23 10:02:59 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Jason Monk
4d0fd71700 Add API to allow apps more control over instantiation
Let them control construction of standard manifest elements (like
activities) through Application. This will allow for things like
dependency injection and class loader magic.

Test: manual
Bug: 62534409
Change-Id: I5fc2a7ec52bb0e232966704d16f94a192d033267
Merged-In: Iaa2215b225c3b97f4e9ac809dfe499f98c7ad5f1
2017-06-22 13:18:27 -04:00
Svetoslav Ganov
40610e3a14 Support native shared libs
resolve merge conflict for ac9b6706b

Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: Ie3f203db12a3f3826e114c219a8341d9acab604f
2017-06-21 15:21:22 +00:00
Dianne Hackborn
e7de4716f0 Merge "Small doc fix." into oc-dev
am: 0f98ddaa01

Change-Id: Iac5b780a9894ce3a5433d1c434286e01313e7f99
2017-06-21 02:42:23 +00:00
TreeHugger Robot
0f98ddaa01 Merge "Small doc fix." into oc-dev 2017-06-21 01:59:02 +00:00
Svetoslav Ganov
324c41ba89 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev 2017-06-21 01:06:22 +00:00
Svet Ganov
f8579581c1 [DO NOT MERGE] Support native shared libs
Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: I0a398593ebe41b2976cb706ca8a388005f5aec83
2017-06-20 12:12:34 -07:00
Philip P. Moltmann
fd5c4dd477 Merge "Correct lastId on onCreate with unexpected state" into oc-dev
am: aed0c10d52

Change-Id: I2197920ee7d6483276473129e74fd9527162dc0a
2017-06-20 15:48:54 +00:00
Philip P. Moltmann
aed0c10d52 Merge "Correct lastId on onCreate with unexpected state" into oc-dev 2017-06-20 15:42:17 +00:00
Adam Lesinski
185285592f Merge "Fix potential race in Theme creation" into oc-dev
am: b0a5fd0384

Change-Id: I964d23b0daad2326989ece5f8ffc086b6286cb44
2017-06-20 01:11:19 +00:00
Adam Lesinski
b0a5fd0384 Merge "Fix potential race in Theme creation" into oc-dev 2017-06-20 01:07:11 +00:00
Felipe Leme
51ed7f4e6b Merge "Fixed updateAutofillValue() when mText is not set." into oc-dev
am: 4eaba84065

Change-Id: I7603a791f8c149799a0adf9e0fe735483ce1be1a
2017-06-20 00:36:12 +00:00
TreeHugger Robot
4eaba84065 Merge "Fixed updateAutofillValue() when mText is not set." into oc-dev 2017-06-20 00:27:37 +00:00
Philip P. Moltmann
e78c771cf5 Correct lastId on onCreate with unexpected state
onCreate might be called with a state not produced by
onSaveInstanceState. In this case the last autofill ID is not set, so we
incorrectly restore it to NO_ID instead of LAST_APP_AUTOFILL_ID

Change-Id: Id40c06bf223c0e3c6235b2d50779e3f4532898b5
Fixes: 62296699
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
(cherry picked from commit 1266d08be5)
2017-06-19 23:57:38 +00:00
Adam Lesinski
1e87a365d6 Fix potential race in Theme creation
Bug: 38190555
Test: none
Change-Id: Id627bd6088dc469baffb1abb8310cd9e992996aa
2017-06-19 22:29:46 +00:00
Felipe Leme
266752317b Fixed updateAutofillValue() when mText is not set.
updateAutofillValue() was crashing some apps when the mText was not set at the
time it was called. One solution would be to not set mText at all - since the
Autofill Service should rely only on getAutofillValue() - but that could break
existing services.

Hence, a safer solution is to set that field if it's null.

Test: existing CtsAutoFillServiceTestCases tests pass
Test: manual verification using Fly Delta app

Fixes: 62751039

Change-Id: I91a8e0ed5db4148f5eb5729b8e254aa3531f15e4
2017-06-19 11:43:33 -07:00
Lucas Dupin
11cc260047 Merge "K-Means color clustering" into oc-dr1-dev 2017-06-17 17:21:06 +00:00
Lucas Dupin
1d3c00d5c7 K-Means color clustering
Test: runtest -x tests/Internal/src/com/android/internal/ml/clustering/KMeansTest.java
Bug: 37014702
Change-Id: Idabc163df5ded362acbe462ae6b351394a36db10
2017-06-16 18:04:42 -07:00
Phil Weaver
0da21f56e4 Merge "Separate a11y and autofill view ids" into oc-dev
am: c91290a6e9

Change-Id: Iec71a9ae34f963ef1f0ce7f6bd09b5af5bbba6e6
2017-06-17 00:59:04 +00:00
Phil Weaver
c91290a6e9 Merge "Separate a11y and autofill view ids" into oc-dev 2017-06-17 00:46:05 +00:00
Winson Chung
09a3325f41 Merge changes I20bdab1b,Id82f9081 into oc-dev
am: 64b044680c

Change-Id: I6a15a1b5a97b34fd18f885a0137a8d674b7b6589
2017-06-16 21:44:59 +00:00
Dianne Hackborn
6aba8530ce Small doc fix.
Test: it builds
Change-Id: Ib4137a5981c2315cebde1ec4a4b5b8ff280b0f36
2017-06-16 14:43:36 -07:00
Phil Weaver
846cda9397 Separate a11y and autofill view ids
Autofill seems to need IDs to be preserved across things
like configuration changes, while accessibility will not
function without views with unique ids. Separating out the
two types of IDs. We can re-combine them once it's clear
that both demands can be satisfied.

Bug: 62301218
Test: Run a11y and autofill CTS, and verify that the play
store app functions with TalkBack after a screen rotation.

Change-Id: I17a99de2874768fc0ade3aa354130dd1f6b4cd7e
2017-06-16 14:36:36 -07:00
Winson Chung
06b50ab4b9 Fix backwards flag causing crash.
Bug: 62692677
Test: Use an activity options that requires the bitmap copy, ensure
      that it does not crash.

Change-Id: I20bdab1b91dfe47f7fe134fd17fe104eb4b27ec1
2017-06-16 11:07:29 -07:00
Lucas Dupin
84b89d9d59 WallpaperColors refactor
Hiding color extraction into WallpaperColors.
This enables us to create WallpaperColors from a a Bitmap
or Drawable.

Fixes: 62197187
Fixes: 62490115
Test: runtest --path cts/tests/app/src/android/app/cts/WallpaperColorsTest.java
Change-Id: I614cfa205e02b551a141642eac6de21251c3bff6
2017-06-16 09:27:43 -07:00
Sudheer Shanka
f9053435a3 Merge "Use correct timestamps of events for logging." into oc-dev
am: 2ca51820f0

Change-Id: I077aab98854ec3d7df78b107518e0151be78a30c
2017-06-15 19:36:18 +00:00
Sudheer Shanka
2ca51820f0 Merge "Use correct timestamps of events for logging." into oc-dev 2017-06-15 19:25:08 +00:00
Sudheer Shanka
c766db0a54 Use correct timestamps of events for logging.
Currently when WM detects certain events, it will notify the logger
of these events asynchronously and logger uses the timestamp at which it
gets notified to log these events. It's possible that the delay between
when the event actually occurs and when the logger gets notified could be
large. So for better accuracy, WM should also pass on the event timestamp
to the logger.

Bug: 62375480
Test: Triggered sysui_multi_action event logs and verified that
      APP_TRANSITION_DELAY_MS is less than APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS.
Test: When the system is not busy, the timestamps we used to log earlier
      and timestamps we log with this change are almost same.
Change-Id: I5f62654a6b7f179d821c0082b180246c8a569df1
2017-06-13 10:29:03 -07:00