1450 Commits

Author SHA1 Message Date
Sudheer Shanka
2250d56a0b Rename MountService to StorageManagerService.
Bug: 30977067
Test: Existing tests pass
Change-Id: Ieac0f11c2b249dcd60441b14c1f391e6f8131d42
2016-11-15 12:43:37 -08:00
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +00:00
TreeHugger Robot
d3637b9781 Merge "Refactored Shell to use IDumpstateListener." 2016-11-12 03:16:17 +00:00
Felipe Leme
29a5b0d0f1 Added a callback for AutoFillService.
So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
  of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
  assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
  unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
  remote object - that will be used to set the auto-fill fields - and
  returns it in the assist bundle (using the
  VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
  which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
2016-11-11 16:02:55 -08:00
Felipe Leme
fa26a0ed08 Refactored Shell to use IDumpstateListener.
BugreportProgressService used to poll system properties to get the
progress of the underlying dumpstate process, but now dumpstate provides
a IDumpstateListener and IDumpstateToken binder objects for the same
purpose.

Test: BugreportReceiverTest passes
Test: manual verification

BUG: 31636879

Change-Id: I81d551781a511cb1cc218a27452875b0bb267f7a
2016-11-11 15:50:21 -08:00
TreeHugger Robot
40d0e338a1 Merge "health: import android.hardware.health@1.0 constants into BatteryManager" 2016-11-11 18:57:47 +00:00
Sandeep Patil
a21c42769f health: import android.hardware.health@1.0 constants into BatteryManager
Test: make
Bug: b/32724915

Change-Id: I7ca7507b7be54442dc3250b02db3e4f7e95f0685
Signed-off-by: Sandeep Patil <sspatil@google.com>
2016-11-10 14:02:45 -08:00
Felipe Leme
5381aa4b58 Initial implementation of the Auto-Fill Framework classes.
This CL provides the initial, skeleton implementation of the Auto-Fill
Framework classes:

- Defines the system service and app-based
  AIDL (IAutoFillManagerService.aidl and IAutoFillService.aidl respectively).
- Defines the 'adb shell cmd' interface.
- Defines the permission required to access the service.
- Registers the service on SystemServer.
- Adds the code to bind the app-specified service to system_server.
- Defines the service class (AutoFillService) required by providers.
- Implements the initial startSession() method.

This is still a very early, "work-in-progress" change:
- It has many TODOs.
- It does not have unit or CTS tests yet.
- It does not provide a callback method to auto-fill the fields.
- In fact, it has a lot of TODOs.

Despite these adversities, it can be tested by following the steps
below:

1.Create an app with a service extending AutoFillService

2.Implement the onNewSession() method

3.In the manifest:
 - Listen to android.service.autofill.AutoFillService intents.
 - Require the android.permission.BIND_AUTO_FILL permission.

4.Explicitly set the app as an autofill-service by running:
  adb shell settings put secure auto_fill_service MY_APP/.MY_SERVICE

5.Start a session against the top activity:
  adb shell cmd autofill start session

BUG: 31001899
Test: manually built and ran it

Change-Id: I00f4822159b31ddddba8f513e57c4474bc74eb89
2016-11-08 14:40:56 -08:00
Etan Cohen
3a1dd86ce4 Merge "[NAN-AWARE] Rename NAN to Aware" 2016-11-05 16:19:43 +00:00
Etan Cohen
0413327d74 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)
(cherry-pick of commit b061f21e7e59a99834e163e2baa1c82229e419a6)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Change-Id: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
2016-11-04 15:42:08 -07: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
TreeHugger Robot
02e17d27b1 Merge "[DPM] Management and retrieval of network logs" 2016-11-02 23:28:10 +00:00
TreeHugger Robot
3694d8789f Merge "[DPM] DO can start network logging and listen for events" 2016-11-02 10:35:28 +00:00
Michal Karpinski
f77ee4f1b7 [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-11-02 09:00:21 +00:00
Michal Karpinski
dd9bb4fdd9 [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-11-02 08:52:53 +00:00
Joseph Pirozzo
fe9368afe8 MAP MCE am: 631768d814 am: d94c280a7f am: c412914520
am: fb70d77f64

Change-Id: Ia56f6ca01a4d92b24f192102917950a10b6cb05d
2016-11-02 01:24:14 +00:00
Joseph Pirozzo
c412914520 MAP MCE am: 631768d814
am: d94c280a7f

Change-Id: I6a765b9a07204afca2763fb98fdb2e92e08292e5
2016-11-02 01:09:14 +00:00
Joseph Pirozzo
d94c280a7f MAP MCE
am: 631768d814

Change-Id: I155fd0e8b44539bf79cec2c6ddb2a4d71b0c23d9
2016-11-02 01:03:51 +00:00
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