Commit Graph

56478 Commits

Author SHA1 Message Date
Eino-Ville Talvala
6c91e2c31b Camera: Add bandaid for preview orientation on reverse-landscape cameras
Camera sensors on Android may be either landscape or reverse-landscape
oriented, but the vast majority of shipping devices only use landscape.

This means that many camera-using apps (which are generally forcing
themselves to landscape orientation) never call setDisplayOrientation,
since its default value of 0 is correct for the majority of devices.

However, there are some reverse-landscape devices, and for those, such
apps get upside-down preview.

This bandaid changes the default value of displayOrientation to be 180
on such devices, so that apps that never call setDisplayOrientation get
correct preview.  This bandaid has no effect on apps that do call
setDisplayOrientation, so hopefully such apps are doing the math
correctly.

Also update documentation to indicate that setDisplayOrientation should
be called, and to note the change in default orientation behavior in
Android N.

Change-Id: I1b2c957642fda8edead61bd07eda9d18c38d1fe6
Fixes: 27840948
2016-03-25 12:29:44 -07:00
Abhijith Shastry
d1ceef09a7 Merge "Add an unblock API to BlockedNumberContract." into nyc-dev 2016-03-24 17:33:58 +00:00
George Mount
f189c2ffa2 Merge "Invalidate entire scene root when executing the transition." into nyc-dev 2016-03-24 14:45:22 +00:00
Clara Bayarri
3e5bf786b7 Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev 2016-03-24 13:30:48 +00:00
Clara Bayarri
bfd996f5cd Merge "Keyboard Shortcuts: Add Keycodes for shortcut representation" into nyc-dev 2016-03-24 11:49:05 +00:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Clara Bayarri
4e850ffaa7 Keyboard Shortcuts: Add Keycodes for shortcut representation
This changes the current API given app feedback received. In order to use
keycodes as well as chars we also must implement a mapping of Keycodes to
Display labels as only keys with a single char representation are provided
by KeyCharacterMap.

Bug: 27409783
Change-Id: I3da653adc4b8cbc66a4d1aa24a5f9181f71e83c3
2016-03-24 11:47:23 +00:00
Abhijith Shastry
cdc2a4c737 Add an unblock API to BlockedNumberContract.
The delete API need not unblock a number if there are multiple copies of a single number.

BUG: 27790536

Change-Id: I6391b0c095827afe85f2ee5d1756741e144c8c26
2016-03-23 19:29:59 -07:00
Andreas Gampe
a7f2bccca3 Merge "Frameworks/base: Refactor package manager" into nyc-dev 2016-03-24 01:59:24 +00:00
Andreas Gampe
bdd30d86ef Frameworks/base: Refactor package manager
Introduce a mapping between dexopt reasons and compiler filters. Use
reasons in package manager and other classes, where possible.

Change PackageDexOptimizer to accept a compilation filter. Adapt for
the split-out profile merging. Pass compilation filter to installd.

Bug: 27689078
Change-Id: I8c0ea6f10fbfdbd096adecc52abfd2466d048fdc
2016-03-23 16:21:21 -07:00
Chad Brubaker
2e6aa196bc Merge "Properly handle whitespace in domain entries" into nyc-dev 2016-03-23 22:44:11 +00:00
Amith Yamasani
df4c40df2f Merge "Localize owner's name to current locale until changed" into nyc-dev 2016-03-23 22:33:17 +00:00
Chad Brubaker
7cc736da82 Properly handle whitespace in domain entries
Domain entries can contain whitespace (or newlines) which should be
ignored to avoid unexpectedly failing to match a domain.

Bug: 27816377
Change-Id: I3691aa4abd409e7be97ad0cf1eb0195725e1b0ab
2016-03-23 15:28:41 -07:00
Adam Powell
30ac43e4ac Merge "Fix bugs around restoring nested retained instance fragments" into nyc-dev 2016-03-23 22:27:31 +00:00
Yohei Yukawa
2c8d528188 Merge "Make sure to call back reportFinish() on the desired Handler." into nyc-dev 2016-03-23 21:48:51 +00:00
Amith Yamasani
6f48d6ef35 Localize owner's name to current locale until changed
Don't set a name for the system user and always return a localized
name until the user explicitly sets a name.

Bug: 27814125
Change-Id: I7972a45d77c07d9efbd67d5b360bacee46247a66
2016-03-23 14:28:25 -07:00
George Mount
52ff2b7798 Invalidate entire scene root when executing the transition.
Bug 27778109

When switching from forced visibility to using real visibility,
I didn't take into account the fact that invalidating INVISIBLE
Views skip invalidation. This CL invalidates the scene root
to ensure that the transition is properly executed.

Change-Id: I092d0fe42229390927f7d1b65fc2b3ce5fc2938d
2016-03-23 14:01:35 -07:00
Adam Powell
eacacb5989 Fix bugs around restoring nested retained instance fragments
Framework edition

In a few configurations the child fragment state of a
retained-instance fragment would not be preserved correctly, leading
to child fragments not being restored. Clean this up along with live
state management issues that were leading to logged warnings during
normal fragment operation.

Bug 27371492
Bug 27477824

Change-Id: I847ac05b1757392580e008dc20c50c3ef365ca68
2016-03-23 13:07:27 -07:00
Yigit Boyar
8b88a85032 Merge "Fix generate layout params to preserve margins" into nyc-dev 2016-03-23 18:22:58 +00:00
Adrian Roos
9b95f615c4 Merge "Ensure notification color contrast" into nyc-dev 2016-03-23 18:14:54 +00:00
Felipe Leme
9eb5555aa6 Merge "Allow Scoped Directory Access on whole volume." into nyc-dev 2016-03-23 17:58:48 +00:00
Peng Xu
370985d00a [Sensor] Add a constant to match native header
This CL add private sensor type base constant to java file to match
C header file.

It is defined that all vendor sensor types have to be >= 0x10000.
There is a constant in sensor.h for reference. However, there is
no such constant defined in Sensor.java before. This CL adds it.

Change-Id: Ia8f8c06583c62879e51779815051c346f1a9cd14
(cherry picked from commit 1795e14dab)
2016-03-23 17:51:02 +00:00
Adrian Roos
4ff3b120ff Ensure notification color contrast
Ensure we have at least 3:1 contrast for the
action buttons. Also ensures that the inline
reply box background has 4.5:1 contrast to white.

Further modifies the color of the inline reply
background to satisfy a 4.5:1 contrast ratio for
the entered text.

Bug: 26831312
Change-Id: If42b1c99d1adee547d0a583c1a69c48ef7287c23
2016-03-23 10:49:40 -07:00
Abhijith Shastry
6ec134dc0d Merge "Document that re-inserting the same blocked number is permitted." into nyc-dev 2016-03-23 17:29:08 +00:00
Michal Karpinski
8aa976b60b Merge "Remove legacy DeviceLogging methods from DPM" into nyc-dev 2016-03-23 16:51:55 +00:00
Pablo Ceballos
6266d8c959 Merge "Java bindings for SurfaceControl::setFinalCrop" into nyc-dev 2016-03-23 16:30:54 +00:00
Abodunrinwa Toki
ae64758edd Merge "Replace Settings.ACTION_KEYBOARD_LAYOUT_SETTINGS with Settings.ACTION_HARD_KEYBOARD_SETTINGS" into nyc-dev 2016-03-23 16:02:36 +00:00
Michal Karpinski
3bce4bfa04 Remove legacy DeviceLogging methods from DPM
Those methods were replaced with SecurityLogging ones.

Bug: 27532425
Change-Id: I6952251d9c15f932517e7cb39a7056f35c3a194f
2016-03-23 13:14:33 +00:00
Chet Haase
5084bd66dd Merge "Clarify docs around weak references to animator targets" into nyc-dev 2016-03-23 12:46:30 +00:00
Yohei Yukawa
c1a72b6b74 Merge "Remove redundant IMM#mServedInputConnection." into nyc-dev 2016-03-23 05:41:08 +00:00
Yohei Yukawa
16e2c7b59a Make sure to call back reportFinish() on the desired Handler.
Before exposing #reportFinish() as a public API, we have to fix an
existing bug that my previous CL [1] for Bug 26945674 forgot to take care.

Currently BaseInputConnection#reportFinish() is always called by using
the root view's Handler.  We should move the logic to call
BaseInputConnection#reportFinishInputConnection() from ViewRootImpl to
IInputConnectionWrapper to make sure that the method in question can
always be called on the desired Handler.

To make things simple, instead of explicitly calling #reportFinish()
from IMM, this CL let ControlledInputConnectionWrapper#diactivate()
internally call #reportFinish() as needed.  This makes it easier to make
sure that #reportFinish() is called after all the queued method calls
are handled.

  [1]: Id9e579bb3e2966986cdcb1c34bc8cacfeca2e1a9
       612cce92ad

Bug: 25332806
Change-Id: Ibe94f115e607a198d12ecd3d4e4f91a7d9469c98
2016-03-22 21:27:48 -07:00
Yohei Yukawa
afb6558c8f Remove redundant IMM#mServedInputConnection.
Following two fields have basically the same lifetime.
 - InputMethodManager#mServedInputConnection
 - InputMethodManager#mServedInputConnectionWrapper
Hence we do not need to maintain both of them.

This is a preparation CL for Bug 25332806 and does not change any
user-visible behavior.

Bug: 25332806
Change-Id: I1181e067aa5bedbdf0c7ec1bcec479257aea511c
2016-03-22 20:53:08 -07:00
Abhijith Shastry
91fa6c122d Document that re-inserting the same blocked number is permitted.
BUG: 27779600
Change-Id: I2cb5cbf5f50ed3bf2183858eb332ea5e6df2a0c6
2016-03-22 18:24:21 -07:00
Pierre Imai
82a3637fce Merge "Improve NetworkCapabilities command chaining." into nyc-dev 2016-03-23 01:11:15 +00:00
Yigit Boyar
885c50b6df Fix generate layout params to preserve margins
This CL fixes a common bug in framework's widgets where they
were not converting a child's margin layout params properly.

The CL fixes, FrameLayout, RelativeLayout, GridLayout and
LinearLayout.

Bug: 27785449
Change-Id: Icecd9181ff82107e412174fe152f35d32d36b2e6
2016-03-22 17:07:44 -07:00
Chet Haase
e60a693d84 Clarify docs around weak references to animator targets
Issue #26069047 Weak reference to the target in animators
can cause interrupted animations

Change-Id: I719f619006e93a94af907c4de7840c691a5aed37
2016-03-22 16:20:46 -07:00
Paul Stewart
68ffbba158 Merge changes Iddeebeb8,Idd1e37a3 into nyc-dev
* changes:
  WifiManager: Use ConnectivityThread
  Create ConnectivityThread
2016-03-22 22:23:48 +00:00
Alex Klyubin
238ec1f7c7 Merge "Unbreak verifying v2 signatures of large APKs." into nyc-dev 2016-03-22 19:40:32 +00:00
Alan Viverette
9e6fe19046 Merge "Ensure that popup width and height are correct on update" into nyc-dev 2016-03-22 19:31:28 +00:00
Jeff Sharkey
c6f0d15c7d Merge "Update TrafficStats SystemApi docs." into nyc-dev 2016-03-22 18:39:52 +00:00
Jeff Sharkey
7067487821 Merge "Throw the right exception flavor." into nyc-dev 2016-03-22 18:39:39 +00:00
Adam Powell
005b272529 Merge "Only call Drawable.setVisible(false) for visible outgoing drawables" into nyc-dev 2016-03-22 18:16:34 +00:00
Adam Powell
35e2ea0203 Only call Drawable.setVisible(false) for visible outgoing drawables
In framework views where we're handling the new visibility aggregated
call we only update the drawable visibility when we're attached to a
window. For old outgoing drawables being replaced, gate this on
whether the drawable is already marked visible instead.

This catches a case where views being inflated might set drawables in
in a superclass constructor and have them replaced in a later
constructor. Gating the call into a drawable that might invoke its
callback (the view being constructed) avoids potential problems where
overridden methods are called unexpectedly on a view subclass that has
not finished running its constructor.

This is a better check than isAttachedToWindow, as isAttachedToWindow
will return false if the view has been temporarily detached from its
parent by a view-recycling container. In those cases, the view would
not correctly update the outgoing drawable.

Bug 27461617

Change-Id: I733a2dd3e3df0a8d80d5dc542ca7b30064159d5d
2016-03-22 11:14:16 -07:00
Chong Zhang
3db51d1999 Merge "Don't change geometry in relayout if preserve geometry is requested" into nyc-dev 2016-03-22 18:05:33 +00:00
Felipe Leme
3ef62ca404 Merge "Documented that UserDictionary is not directly available anymore." into nyc-dev 2016-03-22 17:47:36 +00:00
Chong Zhang
6136273888 Don't change geometry in relayout if preserve geometry is requested
This causes scaling to be applied in the relayout window since the
requested size won't match the window size. Apply the requested size
in repositionChild instead.

bug: 27676101
Change-Id: I03beee2b9fe118a6be329b5fd1338d54e48d9a22
2016-03-22 10:28:27 -07:00
Abodunrinwa Toki
07177140e4 Replace Settings.ACTION_KEYBOARD_LAYOUT_SETTINGS with Settings.ACTION_HARD_KEYBOARD_SETTINGS
Bug: 26943892
Change-Id: I1eb6bd7a9e816190b96dc1516d5874eb966385a4
2016-03-22 17:12:22 +00:00
Aga Wronska
5f7d673f3b Merge "Add config flag to show/hide internal storage. Hide internal storage by default." into nyc-dev 2016-03-22 17:04:28 +00:00
Jeff Sharkey
11caddafb0 Update TrafficStats SystemApi docs.
Bug: 25726690
Change-Id: I221d62eaaf1e0fca8c26e4f19cb25d306710a849
2016-03-22 10:20:35 -06:00
Jeff Sharkey
0c2ccd0598 Throw the right exception flavor.
Change-Id: Ie017fce925ed0122d3820c3f3d91e1b86982a7b1
2016-03-22 10:05:47 -06:00