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
am: f975b74c0c
* commit 'f975b74c0c60160092262fbc05f42f7e2584f0bd':
docs: Updates to multi-window and related docs.
Change-Id: Ia7b8adbe3140a59d2e2433b3795e58a16763527c
am: d29c26073e
* commit 'd29c26073e97e4c6e7825641cf6e76720df395e3':
docs: Updates to multi-window and related docs.
Change-Id: Ic4be60debb41d074d717bfb0989125299428831a
am: c88130c572
* commit 'c88130c5724227b3ba7ef0b5ef4476fedabca650':
docs: Updates to multi-window and related docs.
Change-Id: I308c988e3a93737a478f9f2445b512e86f218643
Framework edition
Add a matching onAttachFragment method to Fragment to match the
fragment host version.
Bug 28760393
Change-Id: I5f50b3446449cae7110da6b4e468ee80f413e1e5
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
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
am: fec0d188c1
* commit 'fec0d188c166e5a2c517f4494e83c1db11b31c68':
Don't show new-window item in Downloads per Gabe.
Change-Id: Ic8d6afb5e38c1ded0ca7750be4ac4822aefbe6c1
am: 25018d41f4
* commit '25018d41f482fe21a45eb2e739f22dc7cc937428':
Fixed connectivity state in some power saving scenarios.
Change-Id: I7ebe3864657d2147034ffae400312e94deb5ef35
am: 4ef107bb7a
* commit '4ef107bb7ad0c1f28db710374bb118e6658d3238':
Close leaked windows when trying to preserve main one
Change-Id: I20b5d6ab8adbb97cffca52e1daf66ed939d508b8
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
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
Correct and clarify the documentation for ContentValues.
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
(cherry picked from commit 1276b5f29e)
Change-Id: Id6f4e93dcca64dd41daeb4066d804ff173f4747b
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
Correct and clarify the documentation for ContentValues.
Change-Id: Iddf54da093e97c32da2568eab8802b1b2715303b
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
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
Change-Id: Ife919c4dcf7bf703b692d338d1fb5844a532dd39
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
am: 11c8f5315b
* commit '11c8f5315b195d6a63f981a7ff434fa7937ba5d3':
DPM control for remote input when locked
Change-Id: Id7074ffdc541d53d4607652cefc4bfdecaaaa335
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
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