Commit Graph

70813 Commits

Author SHA1 Message Date
Joe Onorato
073e4e40e6 Merge "Add android.util.proto package as an @TestApi." 2016-10-14 17:41:10 +00:00
Wale Ogunwale
df241e9771 Allow home activity to be resizeable if it explicitly wants to be.
We previously didn't allow home activities to be resizeable due to not fully
understanding how the UX would work. We now have a better idea of how the UX will
work. However, since this is a behavior change for home activities we require them
to explicitly say they want to be resizeable vs. the framework assuming they can
be resizeable based on their target sdk.

Bug: 30982291
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
Change-Id: I41aefc8c3b3da4c2cf66be81835222196df3ef26
2016-10-14 07:12:31 -07:00
Wale Ogunwale
72a73e3473 Track making activity resizeable based on sdk version separately.
To support resizeable home activities we need to make the home activity
resizeable only when the app explicitly says it is resizeable. To be able
to do that we need to track if we are allowing the app to be resizeable
due to the sdk version it is targetting separately from it explicitly
setting it so that activity manager and window manager can make the right
choices in a follow-up CL.

Bug: 30982291
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
Change-Id: I10f53ee9e57a41a3edece91cf68c5e8ef4bf4489
2016-10-14 07:11:20 -07:00
Wale Ogunwale
3eadad7566 Removed ActivityInfo.RESIZE_MODE_CROP_WINDOWS and related code.
The 2-finger gesture feature which this code is used for never
shipped and was removed from the code base.

Test: Existing tests pass.
Change-Id: I1540c8729fe87fef8e39b41747438557a8da2fa6
2016-10-14 07:05:57 -07:00
Julia Reynolds
3752e50766 Merge "Add support for snoozing notifications" 2016-10-14 12:38:17 +00:00
Christopher Tate
7cfcf2d1b3 Only full-data back up regular files + directories am: da2018efeb am: 0d816b8f69
am: 86208efdc9

Change-Id: I3e39c52cf9895de9b893b7ec6c8d3287af7693b0
2016-10-13 21:23:58 +00:00
Greg Plesur
f38aac7fc0 DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should return 'false' for Wear devices after pairing/upgrade. am: 3514404984
am: 43ed3a5b6a

Change-Id: I20248c835034935c25ee6fa25f8eeeb9125f121e
2016-10-13 21:19:17 +00:00
Christopher Tate
86208efdc9 Only full-data back up regular files + directories am: da2018efeb
am: 0d816b8f69

Change-Id: I3b28c373c58ebebf27b1297e770d2023767e6396
2016-10-13 21:17:09 +00:00
Christopher Tate
0d816b8f69 Only full-data back up regular files + directories
am: da2018efeb

Change-Id: I6ecc74ee9613f221e24acca571560bf8190b7073
2016-10-13 21:13:00 +00:00
Greg Plesur
43ed3a5b6a DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should return 'false' for Wear devices after pairing/upgrade.
am: 3514404984

Change-Id: I8d24007831ba030af0d84f717802c79172db970f
2016-10-13 21:12:51 +00:00
Greg Plesur
216ee1f0e7 Merge "DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should return 'false' for Wear devices after pairing/upgrade." into cw-f-dev 2016-10-13 21:02:01 +00:00
TreeHugger Robot
0604869427 Merge "Switch UM to internal isUserUnlockingOrUnlocked" 2016-10-13 20:50:41 +00:00
Dianne Hackborn
8888aedc1f Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle am: 851ec49de7 am: 9774ea3646
am: 50468217c4

Change-Id: I949e6337546835a0673b85ee6e2ad67fb0a0fec4
2016-10-13 20:44:47 +00:00
Dianne Hackborn
50468217c4 Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle am: 851ec49de7
am: 9774ea3646

Change-Id: I7e27381f7fa4ca8770ca06cdc6c0bdd18a549ae2
2016-10-13 20:38:04 +00:00
Dianne Hackborn
9774ea3646 Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle
am: 851ec49de7

Change-Id: I8a5f8e28f8e4ca7e8fd20abacc0da1dae4055da7
2016-10-13 20:31:43 +00:00
TreeHugger Robot
16c9e8bac7 Merge "Visualize view focus in debug mode." 2016-10-13 20:28:57 +00:00
Julia Reynolds
72f1cbb3b9 Add support for snoozing notifications
To a notification listener, snoozing will appear as a cancel
(with reason snoozed) followed by a post (when the snooze period
ends).

Apps can repost a snoozed notification, but the updates will not be shown
to the user until the snooze period ends.

Snoozing is canceled if the posting app or a notification listener
cancels the notification.

Any notification listener can snooze a notification. Technically apps
can snooze their own notifications also, though that's not public.

In this iteration snoozed notifications will be lost on device reboot.

Test: included. Also, various post, snooze, update, cancel tests with
a listener.

Bug: 30997603
Change-Id: I568a6448196f0992a17d20a4dac296321ec5092b
2016-10-13 16:18:11 -04:00
Christopher Tate
da2018efeb Only full-data back up regular files + directories
Ignore every filesystem entity that is not a regular file or directory.
In particular, we now ignore not only symlinks but also sockets, pipes,
et cetera.

Bug 32143362

Change-Id: If51b54df1f7a643af145eb15bf12d389d19f8780
2016-10-13 12:19:45 -07:00
Greg Plesur
3514404984 DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should
return 'false' for Wear devices after pairing/upgrade.

BUG: 32019375
Change-Id: I2563efe58c98c5dd8440891e478c89e093d8d9ac
2016-10-13 15:08:14 -04:00
Robert Sesek
f43d5b36d6 Merge "resolve merge conflicts of 7031dac to nyc-mr1-dev-plus-aosp" into nyc-mr1-dev-plus-aosp 2016-10-13 18:55:37 +00:00
Vladislav Kaznacheev
1ed3c63bb8 Merge "Avoid sending incorrect or redundant hover events." 2016-10-13 18:29:20 +00:00
Makoto Onuki
4e5434ba5a Merge "Pass client package name to GAL providers (framework)" 2016-10-13 17:49:17 +00:00
Fyodor Kupolov
c413f7078d Switch UM to internal isUserUnlockingOrUnlocked
Internal version of UMS maintains a self-locking data-structure of user
states that  is pushed from ActivityManager. Previously there could
be discrepancies between UMS.isUserUnlockingOrUnlocked and
UM.isUserUnlockingOrUnlocked, which is calling a blocking version
in ActivityManager.

Test: manual + UserManagerTests

Bug: 31995235
Bug: 31833240
Change-Id: Ibafe403f57cd32d9052bb55fe7273a861be1d037
2016-10-13 10:07:20 -07:00
TreeHugger Robot
b4d116f1c6 Merge "Fixing unit issue in dis/charge time remaining parameter." 2016-10-13 01:49:03 +00:00
Dianne Hackborn
851ec49de7 Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle
We now recursively generate new Bundle objects if we need to
do any stripping.

Change-Id: I4ca7896a0771c25264591ae7c79df85816d630d4
2016-10-12 18:17:58 -07:00
Joe Onorato
6c9547d8e1 Add android.util.proto package as an @TestApi.
The classes there add a way for the platform to write out
protocol buffers that doesn't require lots of small objects,
generate code, and extra copying.

Includes the plugin for protoc to generate the constants.

Test: proto cts tests

Change-Id: I6385c198cecda9ac6fa533151609e3ace341af01
2016-10-12 16:37:18 -07:00
Adrian Roos
d92272138d Fix Notification.Action.Builder copy constructor am: 7af5362571 am: 342bc437bf
am: 7bc84b803d

Change-Id: Ice60b61b4868d775b04423e7166182db382d28b2
2016-10-12 23:33:11 +00:00
Adrian Roos
7bc84b803d Fix Notification.Action.Builder copy constructor am: 7af5362571
am: 342bc437bf

Change-Id: I0387ab66ec3d44e34a884fb2f92f32af35e2883c
2016-10-12 23:25:20 +00:00
Adrian Roos
342bc437bf Fix Notification.Action.Builder copy constructor
am: 7af5362571

Change-Id: I0853e663b1895e2c45fad17cfee79202f3b14ef7
2016-10-12 23:19:19 +00:00
TreeHugger Robot
5c8fc58850 Merge "Fix Notification.Action.Builder copy constructor" into nyc-mr1-dev 2016-10-12 23:11:22 +00:00
Adrian Roos
7af5362571 Fix Notification.Action.Builder copy constructor
The copy constructor of Notification.Action.Builder did not copy
the mAllowGeneratedReplies field.

Change-Id: I40fbe8950ee2232e2589ab3930a32bfbebe9fc89
Fixes: 31766718
Test: runtest --path $T/cts/tests/app/src/android/app/cts/NotificationTest.java
2016-10-12 15:19:55 -07:00
Kweku Adams
b0449e01ca Fixing unit issue in dis/charge time remaining parameter.
Although currently not used, the parameter is expected to be in microseconds,
not milliseconds. Hopefully this will avoid issues if the time is used in the
future.

Test: ...make sure it builds locally

Change-Id: Ie131370d3e8c8105623fc60375054f4b22cec110
2016-10-12 22:00:28 +00:00
TreeHugger Robot
3bc72e5549 Merge "Fix import statement in view|transition|animation packages." 2016-10-12 21:31:56 +00:00
Makoto Onuki
296a5fd5b9 Pass client package name to GAL providers (framework)
Test: Manually tested with a corp account and verified with the log

Bug 32072962

Change-Id: I3575b277973263171288fc8665a830f4b83064ab
2016-10-12 13:18:08 -07:00
Aurimas Liutikas
c344036c11 Merge "Fix import statements in android.widget package." 2016-10-12 19:54:54 +00:00
Robert Sesek
d414158f79 resolve merge conflicts of 7031dac to nyc-mr1-dev-plus-aosp
Change-Id: I71fbde71dd97abab77f798b621972fb1d26af799
2016-10-12 15:03:19 -04:00
Aurimas Liutikas
67e2ae8639 Fix import statement in view|transition|animation packages.
This change also remove trailing whitespace.

Test: code still compiles
Change-Id: I7eff4546320d67d2bae58d31bad0625ea0791b8f
2016-10-12 09:09:52 -07:00
Romain Guy
21986f2ae7 Merge "Linear blending, step 1" 2016-10-12 15:52:14 +00:00
TreeHugger Robot
a8e1bac691 Merge "Fix imports in android.text package." 2016-10-12 02:11:09 +00:00
Alan Viverette
aeee6a78e0 Add note about density scaling behavior to setImageURI am: ac21e56f63 am: 74c6d9bd3f
am: 0754f59c4a

Change-Id: Ie22b497eed13c815d40e004db6e19a9875f5168f
2016-10-12 01:48:23 +00:00
Alan Viverette
0754f59c4a Add note about density scaling behavior to setImageURI am: ac21e56f63
am: 74c6d9bd3f

Change-Id: I5b6f9d978d61aedac2c53dcf75dea449468d3c7b
2016-10-12 01:42:06 +00:00
Vadim Tryshev
cdf38ba2c8 Visualize view focus in debug mode.
See the bug for motivation.

Bug: 32099818
Test: Manual check with enabling the dev setting.
Change-Id: I77262f77ac709639e5b1314a0be45612bde70ad6
2016-10-11 18:36:49 -07:00
Alan Viverette
74c6d9bd3f Add note about density scaling behavior to setImageURI
am: ac21e56f63

Change-Id: I4a85ae20023dd0589227ca7684a965a246f451fd
2016-10-12 01:36:33 +00:00
TreeHugger Robot
d35d3c98e4 Merge "Add note about density scaling behavior to setImageURI" into nyc-mr1-dev 2016-10-12 01:24:55 +00:00
TreeHugger Robot
e92c3f6398 Merge "power: PowerHAL support for HIDL interfaces." 2016-10-12 00:54:26 +00: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
Chet Haase
5cde9305e4 Fix small typo in ShortcutManager header docs am: c158431f8e am: 5aa0dfcc0a
am: 3267a2462d

Change-Id: I9417c0a15bbc2125dd0c370bc09b2315706005f1
2016-10-12 00:43:30 +00:00
Chet Haase
3267a2462d Fix small typo in ShortcutManager header docs am: c158431f8e
am: 5aa0dfcc0a

Change-Id: Ia3a1a14cf561e6846245fa8265e96e954d8a185d
2016-10-12 00:31:31 +00:00
Aurimas Liutikas
4037d51b13 Fix imports in android.text package.
This change also removes trailing whitespaces.

Test: code still compiles
Change-Id: I65f79a34288d01616808fa9cd6732ae4ef0f1377
2016-10-11 17:25:05 -07:00
Chet Haase
5aa0dfcc0a Fix small typo in ShortcutManager header docs
am: c158431f8e

Change-Id: I303576d842f92358e9c97714e71c0407d53df39b
2016-10-12 00:19:46 +00:00