Commit Graph

6226 Commits

Author SHA1 Message Date
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
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
Philip Cuadra
b41088b4df Merge "Pinner service for pinning files into memory" into nyc-dev 2016-05-12 21:55:29 +00: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
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
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
Aurimas Liutikas
9c661a40c1 Stop saving ActionMenuItemView state.
There is no useful state to be saved for these views.
This fixes a crash where we try to restore the state of an
ActionView (that shares the same ID as ActionMenuItemView).

Framework version of ag/1020805

Bug: 28110832
Change-Id: I4a09786a1c08bef1765fd8be3affb21dce296272
2016-05-11 14:46:47 -07:00
Dianne Hackborn
ef0a402f58 Fix issue #28400000: Settings memory UI still showing z-ram...
...but probably shouldn't.

Keep track of whether zram is being included in per-process pss and,
if so, don't add it on separately.

Change-Id: Ic945fc3deca8412272bb6019fe1be4b878cb763a
2016-05-11 14:21:07 -07:00
Jeff Sharkey
2d3709246e Fail upgrades that change storage devices.
Now that we live in an FBE world, we need the user to be involved
with every package move to ensure that CE storage is unlocked.  This
means that a package upgrade session that would require moving an
app between storage devices cannot be satisfied.

Bug: 27147501
Change-Id: I274d85cbed727d9185178b77bfc6cef196df17f5
2016-05-10 17:01:51 -06:00
TreeHugger Robot
d0fa4d3aaf Merge "Fix status bar background flicker" into nyc-dev 2016-05-06 01:49:34 +00:00
Chris Craik
867b812eff Fix status bar background flicker
Fixes: 28533578

Change-Id: I075f49b7d20e0e95e790a9755d104a0a51575054
2016-05-05 16:22:21 -07:00
Yohei Yukawa
9f76abc8ab Merge "Fix stale InputMethodManager#mFullscreenMode." into nyc-dev 2016-05-05 21:55:50 +00:00
Dianne Hackborn
5a969aa139 Fix issue #28602068: Add count to job scheduler stats
Also increase the event buffer size to 100, and implement
it as a real ring buffer.  And put that implementation in
a generic class for use in other places.

Change-Id: I06936984e2c253fb5f0eb5d15faf0019ec73d4e2
2016-05-04 17:19:04 -07:00
Winson Chung
bd1708a19d Merge changes If7b8ed3f,I309c3825,Iafd06419,I59f73caf into nyc-dev
* changes:
  Fixes several animation issues related to a dismissing task.
  Pipe the dismiss button logic through the touch handler.
  Skip scroll-to animation when undocking and there are no tasks.
  Fixing issue with docking being disallowed for secondary user.
2016-05-03 21:57:03 +00:00
Abodunrinwa Toki
f62dd564ed Merge "Implement alternative ViewGroup.getChildVisibleRect." into nyc-dev 2016-05-03 20:13:26 +00:00
Adam Lesinski
00194e0f24 Merge "BatteryStats: Fix units on battery charge counter" into nyc-dev 2016-05-03 19:47:35 +00:00
Abodunrinwa Toki
4e7a1208ea Implement alternative ViewGroup.getChildVisibleRect.
This CL allows getChildVisibleRect to optionally always call the
view's parent. The previous version attempted to optimize the call
by not calling further up the view heirarchy when the rect isn't
visible in the current view.

The call is hidden and the previous behaviour is preserved to limit
the bits of code that this change affects.

Bug: 28514727
Change-Id: I49550ed4082bcbdcfe4643b962b50f3308092525
2016-05-03 19:41:15 +01:00
Adam Lesinski
a8018ac47a BatteryStats: Fix units on battery charge counter
The unit for the battery charge counter is in micro-Ampere-hours, not coulombs.
We store the value as uAh but display it in dumpsys as mAh.

Bug:27174034
Change-Id: Ib5cc1ee1c5c191336a3e1f18dbb12c38e833f8d0
2016-05-03 10:41:47 -07:00
Abodunrinwa Toki
0780f3a073 Fix FloatingToolbar popup positioning.
The FloatingToolbar popup wrongly assumes that the main content panel
is wider than the overflow panel. In situations where this assumption
fails, the toolbar popup is positioned wrongly within it's container
window and items appear truncated. This CL fixes this issue.

Bug: 28550367
Change-Id: I41669b1deed7dd34f0b2bd060d14452482d3d36c
2016-05-03 16:25:41 +01:00
Winson
9832f8f463 Fixing issue with docking being disallowed for secondary user.
- When a task is docked, the context is not correct for the given user.

Bug: 28195260
Change-Id: I59f73caf818d294c146d215c2bd31dbe1d4c7c5a
2016-05-02 16:40:00 -07:00
Jaewan Kim
bfa0f48407 Merge "Fix crash when device doesn't support picture-in-picture" into nyc-dev 2016-05-02 22:27:54 +00:00
TreeHugger Robot
33f39a96cb Merge "Fixed a bug where the image and the text were overlapping" into nyc-dev 2016-05-02 22:26:40 +00:00
Jaewan Kim
d98dcab679 Fix crash when device doesn't support picture-in-picture
Bug: 28512987
Change-Id: Ic8287d70fed491d7493d443ba7d9633b7d9aaea9
2016-05-03 07:13:28 +09:00
Adrian Roos
9cb7652fb1 Merge "Make sure all Notification actions are shown" into nyc-dev 2016-05-02 21:04:33 +00:00
Selim Cinek
37878683ff Fixed a bug where the image and the text were overlapping
If a notification was updated with an image, the layout could
stay the old one.

Change-Id: Ic012193e79acf14551801e5e2b704ab9519b9c50
Fixes: 28315999
2016-05-02 13:52:29 -07:00
TreeHugger Robot
4f928358d2 Merge "BatteryStats: Reset per-User Bluetooth and Modem controller activity" into nyc-dev 2016-04-30 03:26:38 +00:00
TreeHugger Robot
3cb7f6bdcd Merge "BatteryStats: Keep track of coulomb counter" into nyc-dev 2016-04-30 02:21:38 +00:00
Adam Lesinski
1a2b39e61c BatteryStats: Reset per-User Bluetooth and Modem controller activity
Bug:28469956
Change-Id: I4db68ecc5b7bde8dd552caadee489b7bad3d6cbc
2016-04-29 17:56:58 -07:00
Adam Lesinski
926969b411 BatteryStats: Keep track of coulomb counter
Bug:27174034
Change-Id: Ica66817faa20b9788536f28f0e593483f033904b
2016-04-29 17:40:11 -07:00
Abodunrinwa Toki
d971a9d5f2 Merge "Ensure FloatingToolbar is not rendered at negative x, y coordinates." into nyc-dev 2016-04-29 14:04:06 +00:00
Justin Klaassen
1fe7ed557d Merge "Support view transformations when positioning floating CAB" into nyc-dev 2016-04-28 20:49:37 +00:00
Makoto Onuki
d1c30db548 Merge "ShortcutManager: When app's data is cleared, remove all shortcuts," into nyc-dev 2016-04-28 20:11:06 +00:00
Adrian Roos
61254356d6 Make sure all Notification actions are shown
Ensures each action gets at least its minimum width to prevent
an overly long action from squeezing out the others.

Change-Id: Ifb6253051b556bbab4738abef12dad0bb6f3c3d6
Fixes: 27996783
2016-04-28 19:59:46 +00:00
Abodunrinwa Toki
51a8af680b Ensure FloatingToolbar is not rendered at negative x, y coordinates.
Bug: 28343540
Change-Id: I550a1a2389a6f90525498962709f0c82e8e310ab
2016-04-28 19:59:57 +01:00
Makoto Onuki
9ac59d0438 ShortcutManager: When app's data is cleared, remove all shortcuts,
as if it's uninstalled.

Fixes 28196831

Change-Id: I1a410372f9e344a10567b00057fa0770eac9fd76
2016-04-28 10:52:02 -07:00
Yohei Yukawa
1544def0fa Fix stale InputMethodManager#mFullscreenMode.
The current mechanism to sync InputMethodService#mIsFullscreen to
InputMethodManager#mFullscreenMode is really fragile because
  1. Currently the state change is notified via
     InputConnection#reportFullscreenMode(), where InputConnection is
     designed to be valid only while the IME has input focus to the
     target widget.
  2. In favor of performance InputMethodService (IMS) calls
     InputConnection#reportFullscreenMode() only when #mIsFullscreen
     changed.  If InputConnection#reportFullscreenMode() failed, there
     is no recovery mechanism.
  3. Screen oriantation change is likely to cause Window/View focus
     state change in the target application, which is likely to
     invalidate the current InputConnection.

What our previous workaround [1] did for Bug 21455064 was actually
relaxing the rule 1 only for InputConnection#reportFullscreenMode().
However, my another CL [2] made the lifetime check of InputConnection a
bit more strict again, which revived the issue as Bug 28157836.

Probably a long-term fix would be to stop using InputConnection to sync
that boolean state between IMS and the application.  However, it's too
late to do such a refactoring in N, hence this CL relaxes the rule 1
again keeping it as secure as possible.

The idea is that we allow InputConnection#reportFullscreenMode() to
update InputMethodManager#mFullscreenMode regardless of whether
InputConnection is active or not, as long as the InputConnection is
bound to the curent IME.  Doing this as a short-term solution is
supporsed to not introduce any new risk because the active IME is
already able to mess up the InputMethodManager#mFullscreenMode by
calling InputConnection#reportFullscreenMode() on any other active
InputConnection.  Bug 28406127 will track the long-term solution.

 [1]: Id10315efc41d86407ccfb0a2d3956bcd7c0909b8
      da589dffdd
 [2]: If2a03bc84d318775fd4a197fa43acde086eda442
      aaa38c9f1a

Bug: 28157836
Change-Id: Iba184245a01a3b340f006bc4e415d304de3c2696
2016-04-28 12:41:11 +00:00
Jaewan Kim
880eff6e9b Prevent pinned stack from having extra elevation
Pinned stack doesn't have focus, so there's no need for setting extra
elevation to show shadow for focused case.

This removes extra eleavtion for pinned stack, and improves the PIP
animation quality by preventing extra surface size change
at the end of animation.

Bug: 27364161
Change-Id: Id099a78de48b2e038a69600c94454b5cbfe0628f
2016-04-28 21:20:18 +09:00
Badhri Jagan Sridharan
5149abe73e Merge "Add low power stats to batteryhistory" into nyc-dev 2016-04-27 23:32:19 +00:00
Dimitry Ivanov
0c6e213dc7 Merge changes I12c9448e,I928175a3 into nyc-dev
* changes:
  Create linker namespace for the system server classloader
  Extract pathclassloader initialization to a separate class
2016-04-27 20:32:26 +00:00
Justin Klaassen
6183b722de Support view transformations when positioning floating CAB
Bug: 24088745

Use ViewGroup#getChildVisibleRect to transform the reported content
rect into the coordinate system of the root view. This allows the
floating CAB to be positioned correctly for views that may have a
scale (or other transforms) applied.

Change-Id: Ia6733a461b44070e7f6bab42f0b6fe2aed6870e5
2016-04-27 13:12:08 -07:00
Badhri Jagan Sridharan
68cdf1997f Add low power stats to batteryhistory
Exports SOC specific low power state info to batterystats service.
BatteryStats service queries the powerHAL module whenever and
updates the HistoryStepDetails whenever setBatteryState is called by the
BatteryService. The stats get appended to the battery history whenever
there is a change in the battery level.

Bug: 26564574
Change-Id: I02b4db00aec0c69d1558492224f3a4dc1c386fa6
2016-04-27 13:08:40 -07:00
Dimitry Ivanov
89dad3360e Create linker namespace for the system server classloader
Bug: http://b/27702070
Change-Id: I12c9448e877202937cf558de75042bcb46f6a933
(cherry picked from commit eb5866d4b0)
2016-04-27 11:42:29 -07:00
Dimitry Ivanov
b1ef62bb38 Extract pathclassloader initialization to a separate class
To be able to reuse this code when creating a classloader for
the system_server.

Bug: http://b/27245894
Bug: http://b/27702070
Change-Id: I928175a39a1beb0446d863a5b8f5edf94686e768
(cherry picked from commit 5d7d777fa6)
2016-04-27 11:38:41 -07:00
Jeff Hao
c7b9482b0c Support to pass <uses-library> option through to dex2oat.
This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.

Part of a multi-project change.

Bug: 26880306

(cherry-picked from 7b331b6a8a)

Change-Id: I523b1b74775e7ed27072498509e743f1f10b1164
2016-04-27 11:11:17 -07:00
Oren Blasberg
c71b6302fe Merge "Show cascading popup menus if screen is big enough." into nyc-dev 2016-04-26 22:43:39 +00:00
Oren Blasberg
a86d1e0b59 Merge "Accommodate NaN in new context menu methods." into nyc-dev 2016-04-26 22:41:01 +00:00