Commit Graph

63310 Commits

Author SHA1 Message Date
Chris Craik
6ee192f4e9 Document that SurfaceView is synchronous in N
bug:28821062

Change-Id: I1c17949d93de3d1f89c504fc061f7d20dd451a4d
2016-05-17 16:17:25 -07:00
Alan Viverette
5bcf7650b4 Merge "Update docs for ColorStateList to include alpha" into nyc-dev 2016-05-16 19:30:38 +00:00
Alan Viverette
c3e5a82691 Use standalone capitalization for month labels
Bug: 28020439
Change-Id: I85169a78142a43ff2348e0b561a7aa995544a65e
2016-05-16 13:35:56 -04:00
Alan Viverette
582dcac856 Update docs for ColorStateList to include alpha
Bug: 28760030
Change-Id: I309364002220b9896f5ddf29dabde79636a722e9
2016-05-16 12:37:55 -04:00
Yohei Yukawa
cef3337cb5 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev 2016-05-16 15:22:21 +00:00
TreeHugger Robot
a1e4cbe211 Merge "Remove onUhandledInputEvent API." into nyc-dev 2016-05-16 15:18:20 +00:00
Clara Bayarri
ac6f034f2a Rename requestKeyboardShortcutsHelper
Per API council feedback

Bug: 28775576
Change-Id: I1c4f98d7ec0d848f0c387aaedf8a0ed80628c64e
2016-05-16 14:15:14 +01:00
Narayan Kamath
8995b00ce8 LoadedApk: Avoid unnecessary work when mIncludeCode == false.
We don't need to set up JIT profiles and register usage etc when
the package context we're trying to construct doesn't request code.

This will correct accounting for packages which are only used for
resources.

bug: 28519185
Change-Id: I849675efa76c8100ae937de478b52254babe384c
2016-05-16 10:39:08 +00:00
Abodunrinwa Toki
376f9f4bd6 Merge "Ensure that ViewGroup.getChildVisibleRect(...) is recursive." into nyc-dev 2016-05-16 09:37:56 +00:00
Martijn Coenen
9a32929def Merge "Address API review comments." into nyc-dev 2016-05-16 09:18:36 +00:00
Yohei Yukawa
833bdcedce Make IMS#clearInsetOfPreviousIme() reliable.
This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
 - PhoneWindowManager#mLastInputMethodWindow
 - PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME.  As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window.  All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

 [1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
      2977eb7b6c
 [2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
      792faa2c16

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change.  Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
2016-05-15 20:05:56 -07:00
Ruchi Kandoi
2512ec9e37 Merge "network: Adds the functionality to parse uid in netlink messages." into nyc-dev 2016-05-14 01:32:54 +00:00
Ruchi Kandoi
fa97fcf7b9 network: Adds the functionality to parse uid in netlink messages.
Netlink notifications about the state of the modem contains uid too.
This patch adds the functionality to add that. It also fixes the bug to
parse the timestamp in the message even in cases where the length is
greater than expected.

Bug: 28527904
Change-Id: I4643bff3eb5b1ffa2dc0b78f1c6947d60487e0d8
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-05-13 15:36:23 -07:00
Svetoslav Ganov
b35301e421 Merge "Make settings cahches generation mechanism robust." into nyc-dev 2016-05-13 22:22:32 +00:00
Svetoslav Ganov
04df738bcb Make settings cahches generation mechanism robust.
Settings is using a MemoryIntArray to communicate the settings table
version enabling apps to have up-to-date local caches. However, ashmem
allows an arbitrary process with a handle to the fd (even in read only
mode) to unpin the memory which can then be garbage collected. Here we
make this mechanism fault tolerant against bad apps unpinning the ashmem
region. First, we no longer unpin the ashmem on the client side and if
the ashmem region is purged and cannot be pinned we recreate it and
hook up again with the local app caches. The change also adds a test
that clients can only read while owner can read/write.

bug:28764789

Change-Id: I1ef79b4b21e976124b268c9126a55d614157059b
2016-05-13 15:14:14 -07:00
Andrew Solovay
f975b74c0c docs: Updates to multi-window and related docs. am: 4d93a21980 am: 8263d6c0a3 am: c88130c572
am: d29c26073e

* commit 'd29c26073e97e4c6e7825641cf6e76720df395e3':
  docs: Updates to multi-window and related docs.

Change-Id: Ic4be60debb41d074d717bfb0989125299428831a
2016-05-13 22:08:17 +00:00
Andrew Solovay
d29c26073e docs: Updates to multi-window and related docs. am: 4d93a21980 am: 8263d6c0a3
am: c88130c572

* commit 'c88130c5724227b3ba7ef0b5ef4476fedabca650':
  docs: Updates to multi-window and related docs.

Change-Id: I308c988e3a93737a478f9f2445b512e86f218643
2016-05-13 22:03:15 +00:00
TreeHugger Robot
a6c0cc0992 Merge "Add Fragment#onAttachFragment for parent fragments" into nyc-dev 2016-05-13 21:53:42 +00:00
Adam Powell
e30299f990 Add Fragment#onAttachFragment for parent fragments
Framework edition

Add a matching onAttachFragment method to Fragment to match the
fragment host version.

Bug 28760393

Change-Id: I5f50b3446449cae7110da6b4e468ee80f413e1e5
2016-05-13 13:38:45 -07:00
Andrew Solovay
4d93a21980 docs: Updates to multi-window and related docs.
Clarified behavior when activity is resized or put in fullscreen
mode, per b/28580007 . Also (per email from o-o) removed misleading
statement about when onStop() might or might not be called.

Both changes can go live now (multiwindow update applies to DP1 & 2,
and onStop() clarification applies to all versions of API), so I'll
submit as soon as this is approved.

See first comment for doc stage location.

bug: 28580007
Change-Id: Ib008f24e5796ec7810b67c91e512e679680d4afd
2016-05-13 13:33:55 -07:00
Wei Wang
02bc008607 Properly handle registration timeout in BLE.
Bug:25384098
Change-Id: I7877f6368c4982fcd91e68810c4da0ab7b5fc6b7
2016-05-13 18:32:15 +00:00
Abodunrinwa Toki
cb66406d33 Ensure that ViewGroup.getChildVisibleRect(...) is recursive.
This change fixes the issue where
getChildVisibleRect(View, Rect, Point, boolean) call isn't recursive.
The method was introduced in I49550ed4082bcbdcfe4643b962b50f3308092525

Bug: 28514727
Change-Id: Ib6b0fb67ca6c700b44f645319c23b1213a2742d4
2016-05-13 19:26:03 +01:00
TreeHugger Robot
fec0d188c1 Merge "Don't show new-window item in Downloads per Gabe." into nyc-dev 2016-05-13 17:26:46 +00:00
TreeHugger Robot
25018d41f4 Merge "Fixed connectivity state in some power saving scenarios." into nyc-dev 2016-05-13 17:14:13 +00:00
TreeHugger Robot
e89dc40706 Merge "Show package icon/label for resolved package-targeted implicit intents" into nyc-dev 2016-05-13 17:11:14 +00:00
Adam Powell
86100d18ad Show package icon/label for resolved package-targeted implicit intents
If we're going to show metadata about a resolved implicit intent that
is targeted to a single package with multiple potential targets,
populate the ResolveInfo with the label and icon of the target
package's ApplicationInfo and set resolvePackageName. This helps use
cases such as EXTRA_INITIAL_INTENTS in ChooserActivity, where
sometimes apps set target packages but not components.

Bug 28739056

Change-Id: I8070d341fccc139463c5ac8d66db45fce02252e5
2016-05-13 08:34:37 -07:00
Andrii Kulian
4ef107bb7a Merge "Close leaked windows when trying to preserve main one" into nyc-dev 2016-05-13 03:24:34 +00:00
TreeHugger Robot
d5c94d1af3 Merge "Partial fix for jumping freeform windows" into nyc-dev 2016-05-13 01:21:12 +00:00
TreeHugger Robot
33d0ff9959 Merge "ContentValues: improve documentation" into nyc-dev 2016-05-13 01:12:52 +00:00
Vladislav Kaznacheev
cb4bbd7af8 Partial fix for jumping freeform windows
Currently every focus change causes a freeform window to jump
for a few frames. The size of the jump is equal to the difference
in inset size (which is derived directly from the window elevation).

This problem goes away for most real use cases if the insets are
not allowed to decrease.

Bug: 28318973
Bug: 22668382
Change-Id: I77ca440a7d9c89cc4d45e6667bf37da94a5c8a9a
2016-05-12 23:56:32 +00:00
Steve Pomeroy
c240b607f7 Fix documentation bug in SQLiteDatabase
The documentation incorrectly states that, "[insertWithOnConflict
returns] the primary key of the existing row if the input param
'conflictAlgorithm' = CONFLICT_IGNORE". Unfortunately, SQLite does
not provide such functionality.

Close: https://code.google.com/p/android/issues/detail?id=13045

Signed-off-by: Steve Pomeroy <steve@staticfree.info>

(cherry picked from commit 8fc3144fa5)

Change-Id: I89e56428e612d667259744e2bc3df124e5a2aa0e
2016-05-12 16:53:10 -07:00
Steve Pomeroy
b31b1cc5ff ContentValues: improve documentation
Correct and clarify the documentation for ContentValues.

Signed-off-by: Steve Pomeroy <steve@staticfree.info>

(cherry picked from commit 1276b5f29e)

Change-Id: Id6f4e93dcca64dd41daeb4066d804ff173f4747b
2016-05-12 16:51:52 -07:00
Yigit Boyar
4c6eeb67a2 Merge "Respect add focusables flags" into nyc-dev 2016-05-12 23:19:22 +00:00
Yigit Boyar
4c6e983000 Respect add focusables flags
This CL fixes 2 bugs in View's addFocusables implementations.

1) addFocusables(list, dir) method was always returning focusables in
touch mode even if the device is not in touch mode.

2) addFocusables(list, dir, mode) was not respecting the provided mod.

Bug: 28745577
Change-Id: I9b9e5af27f8f5b1bb3cc601584fdad7c73e54a5d
2016-05-12 15:11:13 -07:00
Philip Cuadra
b41088b4df Merge "Pinner service for pinning files into memory" into nyc-dev 2016-05-12 21:55:29 +00:00
Jesse Hall
7f0708390b Merge "Move Vulkan layer path setup to ApplicationLoaders" into nyc-dev 2016-05-12 21:13:26 +00:00
Adrian Roos
11c8f5315b Merge "DPM control for remote input when locked" into nyc-dev 2016-05-12 20:52:26 +00:00
Andrii Kulian
eac0ea5cdf Close leaked windows when trying to preserve main one
When app has several windows and activity is relaunched + we try to preserve
main window - other windows just stayed around until removed by timeout or
replaced by app. There was a problem when one of the windows registered
broadcast receiver and set its own timer to remove it. In this case all
receivers were removed by framework because windows were considered leaked
and apps' timer caused crash when trying to remove registered receiver.

This CL removes all windows expect the main one, which we're trying to
preserve in this case.

Bug: 28337135
Change-Id: Ib8790cc8c61801f11d871ba3803bb0ebc3d3be01
2016-05-12 13:37:05 -07:00
Philip Cuadra
7bd0fdd639 Pinner service for pinning files into memory
Pin key files into memory to prevent having to fetch from flash
after boot.  Improves system performance by preventing page cache
thrash.  Retrieves files from a device-specific overlay to allow
specialization.

bug 28251566

Change-Id: I8532f52bd70271794dd7576976d13a524849ce7b
2016-05-12 13:12:20 -07:00
Felipe Leme
781ba14af2 Fixed connectivity state in some power saving scenarios.
NetworkPolicyManagerService (NPMS) manages 4 type of network restriction
when apps are running on background:

- Data Saver Mode (data usage restriction on metered-networks)
- Battery Saver Mode (power restriction on all networks)
- Doze Mode (power restriction on all networks)
- App Idle (power restriction on all networks)

These restrictions affects 2 parts of the system:

- Internal framework state on NPMS which is propagated to other internal
  classes.
- External firewall rules (managed by netd).

Although each of the power-related restrictions have their own external firewall
rules, internally apps are whitelisted to them through the same
whitelist, and the current code is only updating the internal state (and
notifying the internal listeners) when Battery Saver Mode is on.

As a consequence of this problem, there are scenarios where an app
correctly does not have internet access (because the firewall rules are
properly set), but the NetworkInfo state returns the wrong state (like
CONNECTED / CONNECTED).

This CL fixes this problem by splitting the power-related logic from
updateRulesForRestrictBackgroundLocked() into its own
method (updateRulesForPowerRestrictionsLocked()), and making sure such
method is called whenever the firewall rules are updated.

Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; it can be verified by running:

cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
    -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

BUG: 28521946
Change-Id: Id5187eb7a59c549ef30e2b17627ae2d734afa789
2016-05-12 12:33:23 -07:00
Tingting Wang
752129929f Merge "Rename CONTACT_METADATA_SYNC GService Flag." into nyc-dev 2016-05-12 17:11:44 +00:00
Makoto Onuki
26edcba2c9 Merge "Remove ShortcutManager" into nyc-dev 2016-05-12 16:32:56 +00:00
Alan Viverette
c952b035b2 Merge "Remove extra logging in DatePicker" into nyc-dev 2016-05-12 14:57:58 +00:00
Chris Wren
3041d49d88 Merge "document the return type of getImportance" into nyc-dev 2016-05-12 12:53:51 +00:00
Dimitry Ivanov
0997908c95 Move Vulkan layer path setup to ApplicationLoaders
ThreadedRenderer was never the right place for this anyway, and
ApplicationLoaders can provide both the full library search path (not
just the extracted native library dir) as well as the application loader
namespace.

Bug: 28213888
Change-Id: Ibcc0a9178da4dba6f3f3105932fdac1a1d0261af
2016-05-11 22:59:10 -07:00
Jorim Jaggi
63c09fd6cd Merge "Fix smallest width configuration calculation" into nyc-dev 2016-05-12 01:50:05 +00:00
Jorim Jaggi
8563943bd3 Fix smallest width configuration calculation
For calculating the smallest width, we need to iterate through all possible
orientations, snap the task bounds to a valid snap target and then use the
smallest width across all orientations.

In addition to that, when flinging the divider handle to the bottom of the
screen, we need to pass in fullscreen task bounds to avoid that this new
logic applies so the maximizing app only receives one configuration change.

Change-Id: I37aa9a40938517dfaf26770eb41327d76aec7c62
Fixes: 28469673
2016-05-11 18:33:01 -07:00
Adam Lesinski
3723194dc8 Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev 2016-05-12 00:59:29 +00:00
Dianne Hackborn
b3edcd78d2 Merge "Fix issue #28400000: Settings memory UI still showing z-ram..." into nyc-dev 2016-05-12 00:40:18 +00:00
TreeHugger Robot
b9bb8e88c6 Merge "Stop saving ActionMenuItemView state." into nyc-dev 2016-05-11 23:54:41 +00:00