15 Commits

Author SHA1 Message Date
Andreas Gampe
0db10fd0bb Framework: Preloaded-classes tuning
Run the regular use case study.

Bug: 34890992
Test: m
Test: Device boots
Change-Id: I8387b3b09713bd3a031073c14109393a2583c764
2017-02-01 22:19:52 -08:00
Pavlin Radoslavov
45250aca6d Merge "Update the A2DP Codec Config API" am: ccd60f7cbe am: f0096fb868 am: 91707989c4
am: 1ef3c9888e

Change-Id: If69bfe9839a35dc141d741695a217fa4805d46cc
2017-01-31 19:25:11 +00:00
Pavlin Radoslavov
b37f181c98 Update the A2DP Codec Config API
Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
 1. The current codec config
 2. The list of codecs containing the local codecs capabilities
 3. The list of codecs containing the selectable codecs capabilities.
    This list is the intersection of the local codecs capabilities
    and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
 * Added new class BluetoothCodecStatus that contains the extra info:
   current codec config, local codecs capabilities and selectable
   codecs capabilities
 * Renamed method getCodecConfig() to getCodecStatus() and return the
   corresponding BluetoothCodecStatus object.
 * Updates to class BluetoothCodecConfig:
   new methods isValid(), getCodecName(), and updated toString()
   so it is more user friendly
 * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
   EXTRA_PREVIOUS_CODEC_CONFIG.
   The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
   the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: Ia1af2c22e521e863e28a360610aca49f7e62d31b
2017-01-31 18:58:27 +00:00
Clara Bayarri
04d72abde1 Expose fonts.xml via public API with a service
This change creates a new FontManagerService, in charge of providing
font management data. It exposes a public API to retrieve the
information in fonts.xml without accessing it directly. To do this,
it also refactors FontListParser's internal classes into a new public
FontConfig class holding all the font data.

getSystemFonts() returns all the available information in fonts.xml
as well as file descriptors for all the fonts. This allows us to
share the memory consumed by these files between all clients.

Bug: 34190490
Test: See attached CTS change in topic
Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
2017-01-23 15:02:23 +00:00
Aurimas Liutikas
da1acefcd0 Remove unused classes from com.android.internal.widget
Both PasswordEntryKeyboard and RotarySelector seems to have been
used by lockscreen in the past, but are no longer used.

Test: None
Change-Id: I3c1a5aaa426caf677b06a5f77ad8714aa1ad1502
2017-01-10 17:17:19 -08:00
Pavlin Radoslavov
858ab99071 Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96 am: 8b46f87e7e am: da3de76bdb
am: 62c5226e9c

Change-Id: I14d4cc2dc91cb1ab431eda32d5066ac8f471c3a6
2017-01-04 03:54:18 +00:00
Pavlin Radoslavov
44a4ef0aa9 Add a mechanism for configuring the A2DP Source codecs
* Added a new class BluetoothCodecConfig that contains codec-related
  configuration or capabilities: codec type, priority, sample rate,
  bits per sample, channel mode, and codec specific fields.

* Extended the Bluetooth A2DP AIDL interface to get/set the current
  codec configuration

* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
  Framework that is called when there are changes in the
  Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
2017-01-03 17:52:52 -08:00
Sudheer Shanka
2250d56a0b Rename MountService to StorageManagerService.
Bug: 30977067
Test: Existing tests pass
Change-Id: Ieac0f11c2b249dcd60441b14c1f391e6f8131d42
2016-11-15 12:43:37 -08:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
Julia Reynolds
77b2cc920f Ranker --> Assistant.
Rename ranker to assistant and make some of the methods public.
Delete the ext services ranker and restore the listener-type
lifecycle to the assistant.

Test: manual. add a notification assistant and verify it gets
assistant and listener callbacks.

Change-Id: Ia3406c8c14d923426c1b8a6d8b5187efe64c31c3
2016-11-09 09:04:16 -05:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07:00
Sudheer Shanka
ea8e738b3e Remove ApplicationThreadNative from preloaded/compiled-classes.
And add IApplicationThread$Stub and IApplicationThread$Stub$Proxy.

Bug: 30977067
Test: N/A
Change-Id: I86f9517ac25bf68320e94524c617b101e5bbb80c
2016-10-27 18:19:45 -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
Andreas Gampe
e16dc04bd8 Frameworks/base: Update compiled-classes-phone
Another update.

Bug: 27248115
Change-Id: Ia208b37e9b9b649215ad1024ba0438627bc89f8a
2016-06-07 03:12:03 +00:00
Andreas Gampe
3db5a0f48a Frameworks/base: Add compiled-classes
Add a compiled-classes file. This is a threshold-1 set derived
from the same source data as preloaded-classes.

As the file added in this CL has a "-phone" suffix, it will not be
automatically picked up in the build.

Bug: 28026683
Change-Id: I0318bfc83bb13342855b40d7994df951e3cad9ac
2016-04-26 19:14:52 -07:00