1999 Commits

Author SHA1 Message Date
Tony Mak
787703431b Return exit code 0 when the command run successfully
Fix: 62410589
Test: run the pm create-user command and check the exit code

Change-Id: I5bde1f886860cd8edb869ebaa8f6e5376882f03b
2017-06-08 20:33:14 +00:00
Michal Karpinski
73be23de30 Extend "Transport rejected package" message in Bmgr
Test: read it twice :)
Bug: 36705040
Change-Id: I4eda5d2688b5f58f5a07131c5e6d6dafd6250570
2017-06-08 12:10:49 +01:00
TreeHugger Robot
0ecc0ff5e0 Merge "Enable wide color gamut rendering" 2017-06-02 20:07:56 +00:00
Romain Guy
26a2b97dbe Enable wide color gamut rendering
When wide color gamut rendering is requested, hwui will now
use an rgba16f scRGB-nl surface for rendering. This change
also fixes the way screenshots are handled in the platform
to behave properly with wide gamut rendering.

This change does not affect hardware layers. They also
need to use rgba16f scRGB-nl; this will be addressed in
another CL.

Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases

Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5
2017-06-02 11:02:13 -07:00
TreeHugger Robot
347cf3ea9e Merge "Refactor bootanimation into a shared lib." 2017-05-31 19:15:33 +00:00
Ed Coyne
2c9e94aa3e Refactor bootanimation into a shared lib.
We would like to reuse the animation parts of it in Android things.
This refactors the audio part into the _main and gets callbacks from
the BootAnimation class at interesting times. This will be the same
approach we take to integrate with it.

BUG: 37992717
Test: Built locally and pushed to a bullhead, works with sound.
Change-Id: I5eaca07c25eeb5edeab07d7ae7a29945e0e2cd37
2017-05-31 10:24:52 -07:00
Jeff Sharkey
b562e53950 Merge commit '06951ac74d9e74b29037b0a5d8e3b9ad85983b5b' into mergeit
am: 3c3d9d8158

Change-Id: Ia4c7f1792c9b6e8e72b4ffe742249b02b82d0817
2017-05-31 14:54:24 +00:00
Jeff Sharkey
3c3d9d8158 Merge commit '06951ac74d9e74b29037b0a5d8e3b9ad85983b5b' into mergeit
Change-Id: Ifa69c7bb53de94312e2b32607fa098c194a4c72c
2017-05-31 08:43:51 -06:00
Jeff Sharkey
ddff807b76 Consistent "low storage" behavior.
When answering the question "how much space is free", use the same
logic for Settings UI and StorageManager.getAllocatableBytes().  That
is, the reported free space is usable bytes plus any cached data the
system is willing to delete automatically.

This does *not* include any reserved cache space, since we don't want
abusive apps to penalize other well-behaved apps that are storing
their data in cache locations.  Callers freeing cached data need to
now explicitly request defiance of the reserved cache space.  (Most
callers are already doing this by using FLAG_ALLOCATE_AGGRESSIVE.)

Rewrite the core logic of DeviceStorageMonitorService to understand
this new "reserved" cache space, and to be easier to understand.  It
also now handles cached data on adopted storage volumes, which had
been ignored until now.  Also fix bug where we had skipped "low"
broadcasts when the device skipped directly from/to "full" state.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Icbdcf3b52775f7ada1ceaeff2f96094c8d8052f9
2017-05-30 22:17:23 -06:00
Colin Cross
fa45e4364c Merge "Use LOCAL_ADDITIONAL_DEPENDENCIES instead of build system internals" am: a4982eb5dd am: aa92f80288 am: 2aa649593b
am: 58dc4c8dcd

Change-Id: I579b6cfb6edec74da4149f1cf9cee9a061802ff8
2017-05-31 01:46:12 +00:00
Colin Cross
58dc4c8dcd Merge "Use LOCAL_ADDITIONAL_DEPENDENCIES instead of build system internals" am: a4982eb5dd am: aa92f80288
am: 2aa649593b

Change-Id: Ie28b57bd8ed157a7a34a5224bf3f52d7818b6205
2017-05-31 01:37:26 +00:00
Colin Cross
0b81f9727f Use LOCAL_ADDITIONAL_DEPENDENCIES instead of build system internals
Instead of directly adding dependencies to full_classes_compiled_jar
and full_classes_jack, just use LOCAL_ADDITIONAL_DEPENDENCIES and
let the build system take care of where the dependencies are needed.

Test: builds
Change-Id: Ia3078fe0aa54b2d69821a9879cfe43414e1e9c4f
2017-05-30 10:57:34 -07:00
Jaekyun Seok
e958cebff2 Merge "Add a function to verify if idmap is made from given target/overlay packages" into oc-dev am: a941e29c55
am: a3bf175d8a

Change-Id: Id12f519492f588c53206f6ee035e0ee9943eca72
2017-05-25 22:17:44 +00:00
Jaekyun Seok
a3bf175d8a Merge "Add a function to verify if idmap is made from given target/overlay packages" into oc-dev
am: a941e29c55

Change-Id: I47bf589cf849a81a310d0890156bf7c937dd354a
2017-05-25 22:05:51 +00:00
TreeHugger Robot
a941e29c55 Merge "Add a function to verify if idmap is made from given target/overlay packages" into oc-dev 2017-05-25 21:50:57 +00:00
Keun-young Park
04f7fafdeb Merge "reduce flunctuation in boot animation start / stopping time" into oc-dev am: 06fe82293e
am: dcc539f6ce

Change-Id: I634fb90882b73e7a0bfaebd34f619f0476af16ca
2017-05-24 17:50:15 +00:00
Keun-young Park
dcc539f6ce Merge "reduce flunctuation in boot animation start / stopping time" into oc-dev
am: 06fe82293e

Change-Id: I188fab63708e67b70baa2b8e7fb798866f47c9ec
2017-05-24 17:39:21 +00:00
Keun-young Park
721c9dc125 reduce flunctuation in boot animation start / stopping time
- Add separate 100ms interval polling for SurfaceFlinger. Otherwise,
  it can be blocked with 1 sec polling and cause 1 sec of additional
  delay frequently.

bug: 38450031
bug: 35253872
Test: many reboots and check time to finish boot animation, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 15 -w 30 -v

Change-Id: I353ca04183cbe59b82da99dc3fecfce63314cd2f
2017-05-23 09:34:24 -07:00
Jaekyun Seok
71693e6683 Add a function to verify if idmap is made from given target/overlay packages
"--verify" will be used to verify if idmap corresponding to given fd is maded
from given target and overlay packages.

Test: building succeeded and tested on sailfish.
Bug: 37179531
Change-Id: Id19bdfd9c61670437f3e1a5c29762ce93586590f
2017-05-18 00:10:57 +09:00
Siarhei Vishniakou
55656e4cb9 Fix GamepadTestCase#testButtonA CTS test
Hid command, JNI layer:
- Removed dependency of the hid device on libandroid_runtime
and libutils. Using ALooper from libandroid to process callbacks from
/dev/uhid file descriptor.
- Switched to using "CREATE2" and "INPUT2" constructs in uhid driver

Hid command, Java layer:
- Removed delay workarounds, user now responsible for waiting for
onInputDeviceChanged notification prior to using the hid commands.

UiAutomation:
- Added a new executeShellCommandRw function that allows bidirectional
communication to shell command

platform.xml:
- Added uhid permissions to bluetooth stack for /dev/uhid access

- CTS test now consistently passes

Bug: 34052337
Test: CTS test case invoked with the following command:
run cts -t android.hardware.input.cts.tests.GamepadTestCase
-m CtsHardwareTestCases --skip-system-status-check
com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker

Change-Id: Ic916c513b7e652b1e25675f0f38f0f1f3a65d214
2017-05-12 21:01:02 +00:00
Martijn Coenen
ec1f2bcad2 Merge "Merge "Only spawn one binder thread for screencap." into oc-dev am: b1edc48db0" into oc-dev-plus-aosp
am: 6fa0f075e2

Change-Id: Iac9144bacbd7ee247fae3f01408687d8f13b0479
2017-05-12 04:19:07 +00:00
Martijn Coenen
eb6c916533 Merge "Only spawn one binder thread for screencap." into oc-dev
am: b1edc48db0

Change-Id: I251c7b72196f8996051b538a59fd466b65757ce4
2017-05-12 02:09:15 +00:00
Martijn Coenen
b1edc48db0 Merge "Only spawn one binder thread for screencap." into oc-dev 2017-05-11 22:07:37 +00:00
Dianne Hackborn
a54a0df596 Merge "Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist" into oc-dev am: c3b938ca5e
am: 8b4c4f09f6

Change-Id: Ia6dd41e08ea31ccc902c4d9ba714e6448898fac4
2017-05-11 19:34:30 +00:00
Dianne Hackborn
8b4c4f09f6 Merge "Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist" into oc-dev
am: c3b938ca5e

Change-Id: I585bf57074064761c7d216f05be23d7f044208fa
2017-05-11 18:45:00 +00:00
Martijn Coenen
3b53fc5a84 Only spawn one binder thread for screencap.
To work around race conditions in libbinder when
spawning new threads while being shut down.

Bug: 36066697
Test: screencap still works
Change-Id: I774d3dc2491bb578a12dede90cc7fcded976f13f
2017-05-11 17:44:45 +00:00
Dianne Hackborn
983055231b Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist
There is now an IBinder "token" that must be specified when setting
the whitelist duration for an Intent.  To have the whitelist supplied,
the caller to send a PendingIntent must pass in the same token.  The
PendingIntent and IntentSender classes now internally maintain this token
to pass in when their send() is called.

The big complexity for making this work is we now need to associate this
whitelist token correctly with the actual PendingIntent objects that
applications and other code is getting.  To do this, we propagate the
token in the Notification object, and have a new API on Parcel that allows
us to make it available to PendingIntent when it is unmarshalled.  And
this allows to deal with PendingIntents appearing in nested bundles, as
we can propagate that information from the original Parcel to the new
Parcel that Bundle keeps to delay unmarshalling.

Test: manual
Change-Id: Idda00490ccfe2be37e4ab21354b9ab7528a52750
2017-05-10 17:23:02 -07:00
Paul Duffin
fa6f8a76fb Prepare for removal of junit and android.test classes from Android API (step 1)
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.

Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.

Bug: 30188076
Test: make checkbuild

(cherry picked from commit 00229bc6cfd74c3221d02af6df07960a0f36af1a)

Change-Id: I7fea20f92a5a92885733bc6ecb83b7276a48fbc2
Merged-In: Ifc3ee3dc804074a3c572bf2600cfb1fe1b6fa749
2017-05-10 09:42:29 +01:00
Paul Duffin
702d506d57 Prepare for removal of junit and android.test classes from Android API (step 1)
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.

Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.

Bug: 30188076
Test: make checkbuild
Change-Id: Ice80a29b420061f5d0af6eb46426455abf890e5e
Merged-In: Ifc3ee3dc804074a3c572bf2600cfb1fe1b6fa749
2017-05-08 19:33:27 +01:00
Paul Duffin
00229bc6cf Prepare for removal of junit and android.test classes from Android API (step 1)
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.

Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.

Bug: 30188076
Test: make checkbuild
Change-Id: Ifc3ee3dc804074a3c572bf2600cfb1fe1b6fa749
2017-05-08 13:27:51 +01:00
Jeff Sharkey
d1294465fb Merge "Offer to wait until broadcasts have drained." into oc-dev am: 6f4aab2c01
am: 8c921a8f14

Change-Id: Ia55b3b9666b2683e880e07071b53645ba309a57c
2017-05-06 02:29:03 +00:00
Jeff Sharkey
fd65813157 Offer to wait until broadcasts have drained.
We've seen evidence of lab devices racing with other apps that are
using cache space immediately after tests wipe it clean, which can
cause test failures.  To mitigate this, try our best to wait for the
device to go "idle" by watching for broadcast queues to fully drain.

Also improve javadocs along the way.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37486230, 37566983, 37913442, 37914374
Change-Id: I4d430db443b6fa6d33a625fe07b90279b5d51c12
2017-05-05 14:58:47 -06:00
Karthik Ravi Shankar
60df13e750 Merge "Rename CompatibilityDisplay to Vr2dDisplay" into oc-dev am: 1d01f9cf67
am: c4d7248cdd

Change-Id: I8714be5933827c015f1446d5231f5c1f704b53c3
2017-05-04 05:29:12 +00:00
Karthik Ravi Shankar
2b9aaedf63 Rename CompatibilityDisplay to Vr2dDisplay
CompatibilityDisplay used for displaying 2D activities in Vr world. This
is confusing in more than one way. To clarify what it really means,
rename it to Vr2dDisplay.

Changes in this CL -

- /s/CompatibilityDisplay/Vr2dDisplay
- /s/Compatibility/Vr2d - in CompatibilityDisplay context.

Bug: 37851944
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests
passes on Marlin.

Change-Id: I0a442302fa9d0f48bbd0c01a7766b94369e04386
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-05-03 22:16:02 -07:00
Karthik Ravi Shankar
5fd001ac82 Merge changes from topic 'virtual-display-api' into oc-dev am: 13ba34bf37
am: 875c8445a8

Change-Id: I12f88b60d82fba4227c9f565009e6c3e42f6798c
2017-04-24 22:45:33 +00:00
TreeHugger Robot
13ba34bf37 Merge changes from topic 'virtual-display-api' into oc-dev
* changes:
  Add command line option to set compatibility display properties
  Make VR mode virtual display properties customizable
2017-04-24 21:33:59 +00:00
Martijn Coenen
1957ffcfb4 Merge "Stop hwbinder threads from app_process." into oc-dev am: fd25662e03
am: 1181074805

Change-Id: I2c442d25a3083c697c5306b8230710f7e5b9a37e
2017-04-20 17:29:15 +00:00
Martijn Coenen
b69ffdb207 Stop hwbinder threads from app_process.
To prevent it from hanging up.

Bug: 37500397
Bug: 34085250
Test: DismissDialogsInstrumentation test
Change-Id: Ia69f6a5676666bc9286272b82f242d7b1d0ee286
2017-04-19 16:40:49 -07:00
TreeHugger Robot
6954897620 Merge "bitmaps and pixelrefs no longer need lock/unlock" 2017-04-18 18:35:20 +00:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Sungsoo Lim
ab16ea9094 Merge "Revert "MediaSession: Add methods for setting shuffle and repeat modes"" into oc-dev 2017-04-18 00:32:58 +00:00
Karthik Ravi Shankar
33f70c16eb Add command line option to set compatibility display properties
To be able to control the Vr compatibility virtual display's is useful.
In this case, it will be useful to control and test the
CompatibilityDisplayProperties API in VrManager.

Bug: 37260266
Test: adb shell set-compatibility-display-properties 500 500 500
      adb shell dumpsys display

      >>  mBaseDisplayInfo=DisplayInfo{"VR 2D Display", uniqueId
      "virtual:android,1000,VR 2D Display,0", app 500 x 500, real 500
      x 500, largest app 500 x 500, smallest app 500 x 500, mode 6,
      defaultMode 6, modes [{id=6, width=500, height=500, fps=60.0}],
      colorMode 0, supportedColorModes [0], hdrCapabilities null,
      rotation 0, density 500 (500.0 x 500.0) dpi...

Change-Id: Ice5bc569f380154bf2d9e9f9b9387e801d678774
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-04-17 14:25:25 -07:00
Todd Lee
ea2f3be7aa OEM single-build/multi-SKU via dynamic RRO support
The purpose here is to provide support for selectively
enabling Runtime Resource Overlays (RROs) (specifically
those pertaining to a specific SKU, within a OEM's "single
build" covering multiple SKUs) at boot based on the value
of a pre-defined system property.

This mechanism is designed to be compatible with other,
recent changes to Runtime Resource Overlays - specifically:

- has no effect on 'isStatic'. Resource overlays must be
  attributed as static in order to qualify for loading into
  the system_server. The 'requiredSystemPropertyName/
  requiredSystemPropertyValue' mechanism operates
  independent of this and can be used on both static and
  non static overlays. The effect of specifying a conditional
  property on any overlay is that it will ONLY be enabled
  in the event that the system reflects both the property
  and the specified value (Note that in the ABSENCE of a
  conditional property, overlays are assumed to be enabled).

- has no effect on OverlayManagerService (OMS) API. The
  OMS provides the system with an interface through which
  overlays can be enabled/disabled and even rearranged at
  runtime. This provides the basis of support for various
  user-level features (e.g. dynamic theme selection).
  The 'requiredSystemPropertyName/requiredSystemPropertyValue'
  mechanism operates independent of this -
  with enablement being completely coupled to the available
  system properties on the device and NOT subject to change
  at runtime.

Note: as part of this change, original overlay tests have been
updated (fixed) and expanded to include tests to cover the
conditional property implementation.

Issue: http://b/35100249
Test: frameworks/base/core/tests/overlaytests/testrunner.py

Change-Id: I1990ce21a27a385db1e2f53294b69dd03988351e
(cherry picked from commit d5566c6c47faa6b9dda282741e25ac78c9487d58)
2017-04-17 14:12:00 +00:00
Todd Lee
d5566c6c47 OEM single-build/multi-SKU via dynamic RRO support
The purpose here is to provide support for selectively
enabling Runtime Resource Overlays (RROs) (specifically
those pertaining to a specific SKU, within a OEM's "single
build" covering multiple SKUs) at boot based on the value
of a pre-defined system property.

This mechanism is designed to be compatible with other,
recent changes to Runtime Resource Overlays - specifically:

- has no effect on 'isStatic'. Resource overlays must be
  attributed as static in order to qualify for loading into
  the system_server. The 'requiredSystemPropertyName/
  requiredSystemPropertyValue' mechanism operates
  independent of this and can be used on both static and
  non static overlays. The effect of specifying a conditional
  property on any overlay is that it will ONLY be enabled
  in the event that the system reflects both the property
  and the specified value (Note that in the ABSENCE of a
  conditional property, overlays are assumed to be enabled).

- has no effect on OverlayManagerService (OMS) API. The
  OMS provides the system with an interface through which
  overlays can be enabled/disabled and even rearranged at
  runtime. This provides the basis of support for various
  user-level features (e.g. dynamic theme selection).
  The 'requiredSystemPropertyName/requiredSystemPropertyValue'
  mechanism operates independent of this -
  with enablement being completely coupled to the available
  system properties on the device and NOT subject to change
  at runtime.

Note: as part of this change, original overlay tests have been
updated (fixed) and expanded to include tests to cover the
conditional property implementation.

Issue: http://b/35100249
Test: frameworks/base/core/tests/overlaytests/testrunner.py

Change-Id: I1990ce21a27a385db1e2f53294b69dd03988351e
2017-04-13 19:33:11 -07:00
Sungsoo
3e5a34ea8e Revert "MediaSession: Add methods for setting shuffle and repeat modes"
This reverts commit ba11085635ea3ef9383b34dd44c43f2a6cd832ff.

Bug: 36844917, Bug: 36525228, Bug: 36525325
Test: Pass MediaSessionTest and MediaControllerTest
Change-Id: I4805ea58107b5fab8c9f5f0fcaffd1e0e4882ed8
2017-04-13 09:43:23 +09:00
Makoto Onuki
b4c2e6f468 Merge ""bmgr restore" really should wait until operation finishes." into oc-dev 2017-04-12 21:10:37 +00:00
Makoto Onuki
a56ba60c94 "bmgr restore" really should wait until operation finishes.
Test: manual test
Bug 37246838

Change-Id: Ice381dc250e2d2a59cff48152dd3c8d6897d0804
2017-04-12 11:08:49 -07:00
Johan Toras Halseth
9d5f8e11e1 Add helptext to bu command.
bu is used by adb backup/restore, but since flags passed to these adb
commands are just forwarded to bu, we have no guarantee that the help
text for adb shows an up to date description of what bu can do. We
therefore add the help text to bu, such that it is easier to keep in
sync.

Test: adb shell bu help

Bug: 36170696
Change-Id: I8155d17b5c942ce19b981f4a157e7cc7810490ce
2017-04-11 11:49:34 +01:00
Keun-young Park
b706bb7e52 ignore RemoteException from pm if shutdown is already on-going
- In new shutdown flow, adb is guaranteed to be alive while system server
  is alive.
- power manager can be killed before system server is killed.
- This leads into RemoteException for shutdown request to power manager.
- If shutdown is already on-going (=sys.powerctl set), the RemoteException
  should be ignored.

bug: 37096155
Test: adb shell svc power reboot|shutdown and check output to adb
Change-Id: Ia90a900d55123bd7c1bf57c90c49d35332ebfdf5
2017-04-10 20:55:03 +00:00
Johan Toras Halseth
4b8c7f67ac Change flag from -includekeyvalue to -keyvalue/-nokeyvalue
The original flag was added in ag/1946677. As pointed out
in ag/2065837 we ought to stick to the syntax used for
other flags.

Test: adb backup -keyvalue -all
Change-Id: Ie2c7ee3d85740abadaa4119d23470cd9470bd981
2017-04-05 20:45:32 +01:00