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
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
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>
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: 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
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
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
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
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
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
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
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