1632 Commits

Author SHA1 Message Date
Joseph Pirozzo
631768d814 MAP MCE
Add MAP client code into packages/apps/Bluetooth.  Changes here are to
define the MAP MCE interface and enable its selection when running on a
device that is also running a PBAP client (Car Kitt).

Bug: 30467210
Change-Id: Ifa2cdea7d67f63a2b5f3d971df8ec6d321dc5fee
(cherry picked from commit 433b3054847951e8e7b3864d11990604a66b8651)
2016-11-01 17:39:16 -07:00
Winson Chung
655332c641 Creating PinnedStackController.
- Creating a PinnedStackController to keep track of the state of the PIP
  to prevent changes in the system (ie. IME showing) and user interaction
  from clobbering each other.
- Refactoring calls in AM into WM/controller

Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3
Signed-off-by: Winson Chung <winsonc@google.com>
2016-10-31 13:21:55 -07:00
Jakub Pawlowski
d649849928 Merge "Separate LE scanner from GATT client (1/4)" am: 87c997ca21 am: 81d5ecb7a6 am: 61d0088923
am: e582ab854d

Change-Id: Ibbf57cfccad50ae5d7dd9f80a13f08c5cfd1623e
2016-10-28 03:24:38 +00:00
Jakub Pawlowski
61d0088923 Merge "Separate LE scanner from GATT client (1/4)" am: 87c997ca21
am: 81d5ecb7a6

Change-Id: If7688706be45e72e3ab98a35d3712ddae9d508a6
2016-10-28 02:56:54 +00:00
Jakub Pawlowski
81d5ecb7a6 Merge "Separate LE scanner from GATT client (1/4)"
am: 87c997ca21

Change-Id: I8fdf97a457d7566b4e0048624d47a6cfea693f13
2016-10-28 02:50:54 +00:00
Jakub Pawlowski
1b49e6eb04 Separate LE scanner from GATT client (1/4)
Right now, LE scanning functionality is combined with the GATT client.
This is the source of various bugs, like scans suddenly stoppinging when
a GATT client is killed. It also increases memory consumption, because
we associate many structures with a GATT client, which are not necessary
when just scanning.

Test: sl4a BleScanApiTest ConcurrentBleScanTest
Change-Id: I0c25bd4a58bb430eb0ee4100d5f2bbab194f9621
2016-10-27 23:09:35 +00:00
Sudheer Shanka
f734114280 Move IMountService to aidl.
Bug: 30977067
Test: Existing tests passing.
Change-Id: Icadfdcbc79708d3826b4e11afe35f5963aabcd4c
2016-10-27 12:36:37 -07:00
TreeHugger Robot
89aa8b9266 Merge "Import android.hardware.thermal@1.0 constants into HardwarePropertiesManager." 2016-10-26 19:40:42 +00:00
Andreas Huber
fb7accfc83 Import android.hardware.thermal@1.0 constants into HardwarePropertiesManager.
Bug: 32200867
Test: make
Change-Id: I4e63e7c5431b33011b7c334077a5bd0c7edcf3a2
2016-10-25 09:43:38 -07:00
Andrew Scull
22851dbcb2 Merge "Refactor password metric computation." 2016-10-25 09:04:58 +00:00
Andrew Scull
5f9e6f37b2 Refactor password metric computation.
This unifies previously duplicated code.

Bug: 30558331
Test: runtest -x frameworks/base/core/tests/coretests/src/android/app/admin/PasswordMetricsTest.java
Change-Id: I37678b83a03d4f05b9894d4b00e9a741d1a8df27
2016-10-20 19:04:41 +01:00
Sudheer Shanka
cc6418feb7 Move ApplicationThread to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: Iecb382e8720dfb1b6b707272497e3793e6995edb
2016-10-19 11:29:47 -07:00
Dirk Dougherty
4e334e5ce1 Add API 25 to @since list. am: 3376f5893f am: a3c7c8883f
am: f9516473d5

Change-Id: I8101f7b6a509b3e8928307194c4e6f953ca19a9c
2016-10-15 00:29:45 +00:00
Dirk Dougherty
f9516473d5 Add API 25 to @since list. am: 3376f5893f
am: a3c7c8883f

Change-Id: I19088f473a1110f16307b1ac49234ee58cbb3d03
2016-10-15 00:21:16 +00:00
Dirk Dougherty
3376f5893f Add API 25 to @since list.
Change-Id: I636c8e948530d4aa3900496f042f54beb57da15a
2016-10-14 10:27:08 -07:00
Romain Guy
253f2c213f Linear blending, step 1
NOTE: Linear blending is currently disabled in this CL as the
      feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
  or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
  colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
  to disable linear blending. This is only for GLES 2.0 GPUs
  with no hardware sRGB support. This flag is currently assumed
  to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
  This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
  why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
  of the source pixel. The asumption is that a bright pixel will be
  blended on a dark background and the other way around. The source
  alpha is gamma corrected to thicken dark on bright and thin
  bright on dark to match the intended design of fonts. This also
  matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
  could not be sampled in sRGB without a yet-to-be-defined GL
  extension
- The last column of color matrices is converted to linear space
  because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
2016-10-11 17:47:58 -07:00
Dianne Hackborn
354736e196 New infrastructure to switch remaining commands to "cmd" calls.
This introduces a new feature of the IBinder command protocol
to allow the shell command implementation to call back into
its caller to ask it to open files in the calling context.  This
is needed so that commands that have arguments specifying files
can open those files as the calling shell, not the system (or
whatever) process.

To test this all out, move the "am start" implementation over
to ActivityManagerShellCommand, in particular along with its
option to specify a file in which to write profiling data.

Test: Manual

Change-Id: I0c1e3857defefbd19a2ac29413aafbb34b1e48a3
2016-09-29 10:58:44 -07:00
Svet Ganov
9d56963630 [DO NOT MERGE] Use tokens instead of account access trackers am: 32bfb594af
am: 18b725ac0a

Change-Id: I8f90fb4c4d4baa29727d84a28db68f277d305a74
2016-09-27 20:59:00 +00:00
Svet Ganov
18b725ac0a [DO NOT MERGE] Use tokens instead of account access trackers
am: 32bfb594af

Change-Id: I1706ecca7b3b98a2a38483545270941ce8899939
2016-09-27 20:51:28 +00:00
TreeHugger Robot
5c07d0c2ee Merge "[DO NOT MERGE] Use tokens instead of account access trackers" into nyc-mr1-dev 2016-09-27 20:45:48 +00:00
smain@google.com
3d7474bc09 add source.properties file to the offline docs build which is required to get this in the SDK Manager am: 2f2365de4a am: d32abed1af
am: a056abf598

Change-Id: I388f12f11fbf7ed0bcd15bb8f16caea06ab3ff99
2016-09-27 17:34:33 +00:00
smain@google.com
a056abf598 add source.properties file to the offline docs build which is required to get this in the SDK Manager am: 2f2365de4a
am: d32abed1af

Change-Id: I9d6f6f9ce302b3c87d7aac19e6e97cd8a0024f98
2016-09-27 17:28:54 +00:00
smain@google.com
6b860feb42 add source.properties file to the offline docs build which is required to get this in the SDK Manager am: 2f2365de4a
am: 6ed77be41d

Change-Id: I24b8c286fa94c6c27eb9e9fe67b0d38cd17f5544
2016-09-27 17:28:53 +00:00
smain@google.com
d32abed1af add source.properties file to the offline docs build which is required to get this in the SDK Manager
am: 2f2365de4a

Change-Id: I7a5261a043d803fdc0ac6b916708e0f743b31865
2016-09-27 17:23:54 +00:00
smain@google.com
6ed77be41d add source.properties file to the offline docs build which is required to get this in the SDK Manager
am: 2f2365de4a

Change-Id: I15b5ea8a37ec7c718d23db14baed6c8ffb0af13c
2016-09-27 17:23:54 +00:00
Narayan Kamath
5786162605 Merge "Remove (now) unnecessary reference to core-lambda-stubs." am: 68e91852c3 am: c1d97c9250 am: 5e7dd0999e
am: c4108d2f24

Change-Id: Idcf4f8c41c1b83cd6d668ed6d9bc7d1d0c4e567a
2016-09-26 10:16:52 +00:00
Narayan Kamath
c4108d2f24 Merge "Remove (now) unnecessary reference to core-lambda-stubs." am: 68e91852c3 am: c1d97c9250
am: 5e7dd0999e

Change-Id: I45e2c290cbed1fcf917d54f6a50a60bfa7540f44
2016-09-26 10:11:57 +00:00
Narayan Kamath
5e7dd0999e Merge "Remove (now) unnecessary reference to core-lambda-stubs." am: 68e91852c3
am: c1d97c9250

Change-Id: I7eb80947c4a0170af7e6af4f878f3d15c8587949
2016-09-26 10:07:19 +00:00
Hugo Benichi
8389d6f0e1 New IpConnectivityMetrics service am: eab511b582 am: 3a353a2044
am: 0daeac5dd4

Change-Id: Id08f9c8426780578c0edde7a69cf118fac232177
2016-09-25 20:09:46 +00:00
Svet Ganov
32bfb594af [DO NOT MERGE] Use tokens instead of account access trackers
We keep track which process saw and account to whitelist
the app for future access as an optimization to avoid
prompting the user for account access approval. Some apps
use SefeParcelable where the parcels are marshalled
which does not allow the parcel to contain IBinders.
To avoid this we are switching from account tracker remote
objects to unforgeable tokens.

bug:31162498

Change-Id: I3b52bff720655f695ad0c58d420eb35ef93161b9
2016-09-24 06:00:14 +00:00
Svet Ganov
c1c0d1cc53 Use tokens instead of account access trackers
We keep track which process saw and account to whitelist
the app for future access as an optimization to avoid
prompting the user for account access approval. Some apps
use SefeParcelable where the parcels are marshalled
which does not allow the parcel to contain IBinders.
To avoid this we are switching from account tracker remote
objects to unforgeable tokens.

bug:31162498

Change-Id: I19916b54afd0b47e57c517145aa6b1ff17154144
2016-09-23 21:47:38 -07:00
Hugo Benichi
0daeac5dd4 New IpConnectivityMetrics service am: eab511b582
am: 3a353a2044

Change-Id: I5cf485edd3ab1ebb81a2a9d35dfb8bd6d8bcc305
2016-09-23 03:54:06 +00:00
Narayan Kamath
2090e9222c Remove (now) unnecessary reference to core-lambda-stubs.
Tis now included in core-oj.

bug: 31675876
Test: make checkbuild
Change-Id: If9062a55ec02fe653542dcb4a41020c8e1f6f15e
2016-09-22 17:52:37 +01:00
Hugo Benichi
eab511b582 New IpConnectivityMetrics service
This patch defines a new metrics service for IpConnectivity events
defined in android.net.metrics, separate from currently existing
MetricsLoggerService.

Similarly to MetricsLoggerService, the new service has an event buffer.
It also implements a dumpsys interface that can be used to flush events
and output a serialized proto.

Bug: 31254800
Change-Id: I0c3faeb4008b283f85d9ba9460371fa68956ea3b
2016-09-22 22:25:27 +09:00
smain@google.com
2f2365de4a add source.properties file to the offline docs build
which is required to get this in the SDK Manager

Change-Id: If53cdedcb8f5910fe37add44168348c9fd14d0cb
2016-09-21 16:26:41 -07:00
TreeHugger Robot
2a9b220608 Merge "While-list apps to access account if already saw it" 2016-09-21 07:03:05 +00:00
Etan Cohen
e6338578bd Merge "[NAN] Rename to make discovery explicit" am: 5706a8f535 am: eb4c838c46 am: ad864c8fd9
am: b7f1a665b5

Change-Id: Icfb2cc41125f14add10c2d8881d651c51c484b6c
2016-09-21 05:42:24 +00:00
Svet Ganov
f6d424f133 While-list apps to access account if already saw it
Sync adapters without an account access cannot run until the
user approves the account access (for the case the account
access is not allowed by other policy such as being singed
with the same cert as the authenticator). However, if the
sync adapter package already got the account from another
app which means it already saw the account we white-list
the sync adapter app to access the account as it already
saw it - the bird is out of the cage.

bug:31162498

Change-Id: I2b72f3b0d6307561ed68db2f2e9c900b15e8d098
2016-09-20 22:21:07 -07:00
Svetoslav Ganov
8b6456bc88 Merge "Move device serial behing a permission" 2016-09-21 03:32:47 +00:00
Etan Cohen
b7f1a665b5 Merge "[NAN] Rename to make discovery explicit" am: 5706a8f535 am: eb4c838c46
am: ad864c8fd9

Change-Id: I338cd7ddf54997bdf19a95056e5793103ffc2e23
2016-09-20 17:07:31 +00:00
Etan Cohen
ad864c8fd9 Merge "[NAN] Rename to make discovery explicit" am: 5706a8f535
am: eb4c838c46

Change-Id: Ie03f1e3fbead74c4de77758163ad911e68e54b90
2016-09-20 16:58:32 +00:00
Etan Cohen
3855370c24 [NAN] Rename to make discovery explicit
Pure rename operation - no other functional changes.

(cherry-pick of commit ddb5f646562f31d7e78778a978e546f85312b009)

Bug: 31470256
Test: unit tests, integrated (sl4a) tests.
Change-Id: I5110d1a673b7ba4e39350d723b5984586fec585a
2016-09-19 21:52:14 +00:00
Dirk Dougherty
e7d73ac424 Add build target for generating navtree json with all inherited members. am: 7d47b55cc0 am: e444205930
am: 3776a3253f

Change-Id: I84c26fedba5054ea470bd895664b2dac4d191746
2016-09-17 00:35:44 +00:00
Dirk Dougherty
b63d9d8aad Add build target for generating navtree json with all inherited members. am: 7d47b55cc0
am: 33684f217b

Change-Id: I34040be694eb1c82b2feb977c6389890d7755d0d
2016-09-17 00:24:10 +00:00
Dirk Dougherty
3776a3253f Add build target for generating navtree json with all inherited members. am: 7d47b55cc0
am: e444205930

Change-Id: I9aafdf69cf9e0f29d6367a0dacfef53f5147a2cf
2016-09-17 00:14:04 +00:00
Dirk Dougherty
33684f217b Add build target for generating navtree json with all inherited members.
am: 7d47b55cc0

Change-Id: Ib9279dc1ec2149a535f4b7a4843612da6af27650
2016-09-16 23:58:02 +00:00
Dirk Dougherty
e444205930 Add build target for generating navtree json with all inherited members.
am: 7d47b55cc0

Change-Id: I66a805e871a9501bd5d19587dbc004be0cfd01d0
2016-09-16 23:56:51 +00:00
Dirk Dougherty
7d47b55cc0 Add build target for generating navtree json with all inherited members.
Change-Id: I142e848b5288d92e14445025705ea7596e635b6b
2016-09-13 16:44:25 -07:00
Svet Ganov
37e43275ee Move device serial behing a permission
Build serial is non-user resettable freely available deivice
identifier. It can be used by ad-netowrks to track the user
across apps which violates the user's privacy.

This change deprecates Build.SERIAL and adds a new Build.getSerial()
API which requires holding the read_phone_state permission.
The Build.SERIAL value is set to "undefined" for apps targeting
high enough SDK and for legacy app the value is still available.

bug:31402365

Change-Id: Iddd13430b2bd1d9ab4966e31038ecabdbdcec06d
2016-09-11 18:44:38 +00:00
Svet Ganov
7580351e9e [DO NOT MERGE] While-list apps to access account if already saw it am: 91d37f43c7
am: f56f70365d

Change-Id: I3a553a7efe34feb9fbfa5d5c504874a2780bf132
2016-09-09 02:42:23 +00:00