Commit Graph

5582 Commits

Author SHA1 Message Date
Jorim Jaggi
04c2fbd6fe Draw status bar background in BackgroundFrameRenderer while resizing
To make sure there is always enough contrast between the status bar
icons and the background, we move the drawing for the status bar
background into BackdropFrameRenderer while resizing, so we can
extend the width into the full surface width.

Bug: 24365214
Change-Id: Ifbb10bacf66670c3637f6f6730a8ac47eb1c3939
2015-12-03 16:06:09 -08:00
Jorim Jaggi
6e0ce286a8 Don't remove colored bar views when relaunching
Change-Id: I518521e6b5e0b18a7f9ad9c7c6a67d55e2dfa2ab
2015-12-03 15:23:44 -08:00
Jorim Jaggi
4fa7892f35 Add flag so apps always draw status bar background
So we don't have to implement crazy magic when one app requests
drawing the status bar by itself, and the other doesn't in split
mode.

Bug: 24365214
Change-Id: I1f6a0efd0865b784402055e008da2f31e626f163
2015-12-03 15:23:27 -08:00
Alan Viverette
9643e73951 Merge "Ensure only one context menu is shown at a time" 2015-12-03 21:27:07 +00:00
Yohei Yukawa
0eae0eb5a6 Merge "Fix special handling of a fake language code "tl"." am: 9fd2af6b32 am: 30e321b54a
am: d42df4f68e

* commit 'd42df4f68e16bc3800d4d944caddbcbe79986fe8':
  Fix special handling of a fake language code "tl".
2015-12-03 20:00:30 +00:00
Yohei Yukawa
30e321b54a Merge "Fix special handling of a fake language code "tl"."
am: 9fd2af6b32

* commit '9fd2af6b323ef98695701a8bcfdd3ca1c4dd7965':
  Fix special handling of a fake language code "tl".
2015-12-03 19:10:30 +00:00
Clara Bayarri
10ad84a17d Create a separate Work Challenge check
This allows us to tell lock checks from FBE checks separately,
and will be useful when dealing with password unification.

Change-Id: Ifbea425f749fee4d6d51faddd8b64bf717a1a5f8
2015-12-03 16:18:53 +00:00
Yohei Yukawa
ed65bc0c62 Fix special handling of a fake language code "tl".
My previous CL 92280cd309 [1] had a silly
mistake that "tl" is converted to "fil" but "tl_PH" is not.

  [1] I94f203bddceb9c87710cb187cc3cc0ee6d9092a5

With this CL, the compatibility rewrite-rule from "tl" to "fil" starts
working regardless of the existence of countly/variant subtags in locale
string.  So far the only affected platfrom is API Level 23.

Bug: 20696126
Change-Id: Ica9cd2baac002c406f92331aadd7725d7424046a
2015-12-02 18:22:41 -08:00
Dianne Hackborn
a864049aae Merge "Fix reporting of uid state in battery stats." 2015-12-02 20:05:57 +00:00
Abodunrinwa Toki
7e29d1b4fc FloatingToolbar polish.
This patch updates the FloatingToolbar to look and transition
exactly as described in the UX spec.

It includes an animating (VectorDrawable) overflow button and
menu item buttons that sit in place during transitions.

Bug: 24257588
Change-Id: I2b3f84ba451800830878667ce1abd7a99b4f9fea
2015-12-02 11:14:43 +00:00
Dianne Hackborn
a8d10945a6 Fix reporting of uid state in battery stats.
Now that the activity manager keeps track of per-uid process states,
we can push that already rolled-up data into battery stats to directly
track the times in those states.

The problem with the reporting was actually that we weren't dealing
correctly with negative process states, which is now fixed.  (It was
interpreting them as FOREGROUND rather than not running.)

Also split out a number of new states -- TOP, FOREGROUND_SERVICE,
TOP_SLEEPING -- from FOREGROUND.  This should allow us to get a much
better idea of how much an app has been actively in use: TOP is when
it is directly visible to the user or in use by such, FOREGROUND_SERVICE
is when it is running in the background in a way the user is aware of.
Also when reporting these numbers, they are no longer added together as
reported but kept as separate times.

Change-Id: I6d307503a4b4ad5c0d5d49305ef63f8eb858e2c9
2015-12-01 16:53:28 -08:00
Tom Taylor
32363a023a Merge "TRON: log changes to the default SMS app" 2015-12-01 18:00:39 +00:00
Selim Cinek
4fb12d3f8e Made the bigtext now nicely float around the image
If there is an image instead of applying the same
margin everywhere, the text now floats around the
image.

Change-Id: I87f9ca9f51fb270b0732a99374544381bd1fc4e0
2015-11-30 17:45:15 -08:00
Tom Taylor
2be1b0e975 TRON: log changes to the default SMS app
Bug 25929677

Add a constant for logging the action when a user changes the default
SMS app.

Change-Id: If0b0919f795390e98c33bcac849614c07ef1442f
2015-11-30 16:29:17 -08:00
Yohei Yukawa
8ce2a538d9 Use Context.getSystemService(Class<T>) for InputManager.
This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving InputManager.
Note those are bundled code.  Hence we don't need to make sure
Build.VERSION.SDK_INT >= 23.

Change-Id: Iee47e374e1349720e3100bab33ed139e1f47c169
2015-11-26 00:02:11 -08:00
Yohei Yukawa
0466206a6a Merge "Tell the reason why IMM called startInput()." 2015-11-25 20:36:13 +00:00
Alan Viverette
021627eb58 Ensure only one context menu is shown at a time
Refactors the menu helper classes. Both classes now implement a common
MenuHelper interface, which eliminates the need to keep separate helpers
on PhoneWindow and unifies the DecorView showContextMenuForChild()
implementations.

We now explicitly dismiss any previously shown context menu before showing
a new context menu. Previously we relied on the modal nature of the dialog
context menu to prevent multiple menus from being opened at once, but this
is no longer reliable with popup context menus.

Bug: 25656520
Change-Id: Idab3daa6d6888f803f2e33660fe1dd488e4c28d1
2015-11-25 14:22:00 -05:00
Yohei Yukawa
35d3f37bd5 Tell the reason why IMM called startInput().
As a preparation to fix Bug 25373872, this CL introduces an additional
int parameter into the following two methods
  - IInputMethodManager.startInput()
  - IInputMethodManager.windowGainedFocus()
so that IMMS can know why IMM needs to start input.  Currently the
"startInputReason" parameter is used only for debug message only when
the OS is rebuilt with flipping IMMS#DEBUG to true.  Basically this
should have no impact in production builds except for a tiny overhead
of having one int parameter in some internal IPC calls.

Note that since 7663d80f6b [1] basically
IMMS#windowGainedFocus() has been a superset of IMMS#startInput().
Hence we should pass to "startInputReason" parameter to
IMMS#windowGainedFocus() as well as IMMS#startInput().

  [1]: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb

Bug: 25373872
Change-Id: Ia1fe120af7d71495c5f3a4fc0ec6390efb8240ca
2015-11-25 11:07:19 -08:00
Filip Gruszczynski
811dc3b42b Allow preloading of freefore multi window drawables.
Bug: 25081468
Change-Id: Ic6ec6050882e5362e1ab8734962d163fff04b53d
2015-11-23 18:16:24 -08:00
Filip Gruszczynski
a7308c1bd8 Merge "Handling touch events on the caption." 2015-11-21 00:42:01 +00:00
Filip Gruszczynski
edb6e12014 Merge "Remove allow_stacked_button_bar from support library." 2015-11-20 22:02:57 +00:00
Alan Viverette
3c5aeef512 Merge "Dispatch the actual PopupWindow dismiss callback to PopupMenu" 2015-11-20 21:59:19 +00:00
Filip Gruszczynski
a33bdf372c Handling touch events on the caption.
We need a more sophisticated touch handling to support overlaying the
caption. The touch events need to be routed in following order:
close/maximize buttons, application content, caption dragging.

Bug: 25486369
Change-Id: I9d4e971fb055c217c0bd83f0490fb42a5c22e93b
2015-11-20 13:25:24 -08:00
Julia Reynolds
e31444f7c9 Merge "Implement notification ranking by topic." 2015-11-20 20:31:08 +00:00
Alan Viverette
708aa9d964 Dispatch the actual PopupWindow dismiss callback to PopupMenu
Previously the dismiss callback was called immediately after the menu
received a close request; however, the dismiss callback implies that
the menu's window has finished animating and been removed from the
window manager.

Also cleans up handling of mPopup in MenuPopupHelper to prevent
unnecessary MenuPopup allocations and convert unnecessary fields into
method arguments.

Bug: 25323707
Change-Id: I8e3877ae6c40b4d0f1df23a4ff4fa48a7df34e0d
2015-11-20 15:21:30 -05:00
Alan Viverette
be5ec13acf Merge "By default, display PopupMenu at Gravity.START and resolve X offset" 2015-11-20 19:27:44 +00:00
Julia Reynolds
233a5f97ea Implement notification ranking by topic.
Including sensitive notification visibility & DND bypass.

Bug: 22451710
Change-Id: I5f3a0c6d59de0495cb904bad6f886eb29ed4bda4
2015-11-20 14:25:07 -05:00
Filip Gruszczynski
66f1ba01c1 Remove allow_stacked_button_bar from support library.
Bug: 25394588
Change-Id: Id7896746aebeab273297f3c5e78f0f794fa5bc82
2015-11-20 10:57:19 -08:00
Alan Viverette
d6443f60e1 By default, display PopupMenu at Gravity.START and resolve X offset
Bug: 25801269
Change-Id: I8c8090a59780c131cee2d56b668f1c4e062b8ebe
2015-11-20 13:57:15 -05:00
Adam Lesinski
e98c57a829 Merge "Fix batterystats battery level int packing" 2015-11-20 18:53:03 +00:00
Adam Lesinski
3944c81cd7 Fix batterystats battery level int packing
We introduced some new flag at the lowest significant bit of the
battery level int but failed to account for it when unpacking.

Bug:25596467
Change-Id: I4320e6fcc208ec6de249b14fe3e399ab2f32d839
2015-11-20 18:49:50 +00:00
Przemyslaw Szczepaniak
3f72604be8 Use HexDump instead of java.lang.IntegralToString
java.lang.IntegralToString is being removed, replaced
all its usage by com.android.internal.util.HexDump.

Bug: 24932279
(cherry-picked from 15fc0548a536750110e159e06a39ba943eccdd81)

Change-Id: Id6ab88337af12d93cd73c41775b9d5baa1e61d96
2015-11-20 14:11:02 +00:00
Fyodor Kupolov
c40e244b4a Added a placeholder home activity for system user
Standard launcher can be uninstalled for system user. A low priority
placeholder home activity is used to make sure the system can always
boot. By default the component is disabled for all users, and is only enabled
for the system user at boot time.

Bug: 25726710
Change-Id: I97eed02c9e2bbd69a737cc1d203110bed837b803
2015-11-19 13:04:35 -08:00
Filip Gruszczynski
8fbddc9367 Merge "API for overlaying app content over decor caption in freeform windows." 2015-11-19 19:51:55 +00:00
Adam Powell
ce805b3288 Merge "Add support for partial view layouts" 2015-11-19 18:59:06 +00:00
Todd Kennedy
b4fdb933cb Merge "Allow ephemeral provider/installer" 2015-11-19 18:54:57 +00:00
Filip Gruszczynski
63250651ca API for overlaying app content over decor caption in freeform windows.
Bug: 25486369

Change-Id: I8fba30dd690d9f0ccc48149f57ce254286b0c2ae
2015-11-19 10:38:38 -08:00
Todd Kennedy
b8a279ee83 Allow ephemeral provider/installer
The ephemeral provider is a service that simply determines whether or
not an ephemeral application is available. The ephemeral installer
does the heavy lifting of installing the ephemeral application.

Bug: 25119046
Change-Id: I591f4c2c3f2b149d299fa8b4f359f2582d9199cb
2015-11-19 10:25:53 -08:00
Adam Powell
c55d5072ac Add support for partial view layouts
Traditionally, when a view called requestLayout it would force
recursive requestLayout calls for all parent views up the
hierarchy. This meant that there was no way to determine at traversal
time whether a parent view itself needed layout, or if just one of its
descendants did.

Add a ViewParent method requestPartialLayoutForChild(View). This lets
a caller state that a particular child of a given parent needs a
remeasure and relayout at its current measured size and position
within that parent. This can help prevent the full-tree relayout often
caused by otherwise trivial changes. Partial layouts are processed
after any pending "full" relayout during ViewRoot traversals, but
before drawing.

Add a ViewGroup method requestLayoutForChild(View). This lets a
ViewGroup decide whether it is more appropriate to request a
traditional relayout or a partial layout for itself or just the child
that changed.

Add a ViewParent method findDependentLayoutAxes. This allows a caller
to check if the ViewParent's layout is dependent on a specific direct
child view along one or both axes. Called recursively, this can be
used to determine if a change in a child view can be isolated to a
partial layout, even if its direct parent's own layout is tied to its
other ancestors. (e.g. MATCH_PARENT, LinearLayout weights)

Implement ViewGroup#requestPartialLayoutForChild to call new
ViewParent method findDependentLayoutAxes and based on the result,
either request a full layout for itself or a partial layout for the
child in question.

Implement findDependentLayoutAxes for common framework ViewGroups. A
private implementation in ViewGroup is available for use by framework
classes that will deal with basic LayoutParams. These implementations
specifically check for derived LayoutParams classes and abort the
optimization if they find something beyond their expected parameter
types.

Change-Id: I0a1a9b79293d17d4fae8d9892b96d3586f9401ae
2015-11-19 09:31:56 -08:00
Wale Ogunwale
c38a5d7da1 Merge changes I6b641d6b,Id573a309
* changes:
  Renamed NonClientDecorView to DecorCaptionView
  Control display of shadows for multi-window in DecorView
2015-11-18 22:53:03 +00:00
Wale Ogunwale
62a91d67ce Renamed NonClientDecorView to DecorCaptionView
DecorCaptionView better describes what it does now which is to
display the caption area and control buttons within it.

Change-Id: I6b641d6b117bb8f03656bff93702fc093160851d
2015-11-18 11:44:10 -08:00
Wale Ogunwale
2b547c3f30 Control display of shadows for multi-window in DecorView
Allows us to display shadows without needing the NonClientDecorView.
For example, windows in pinned stack don't have a NonClientDecorView.

Bug: 25006507
Change-Id: Id573a30942a9bfcd002b86f0956d0b2a14ec2c2b
2015-11-18 10:33:22 -08:00
Yohei Yukawa
711bcdea5f Merge "Tell the reason why IMMS unbinds IME client." 2015-11-18 18:15:18 +00:00
Filip Gruszczynski
9920e0f1cc Merge "Swtich from max_action_buttons resource to a method." 2015-11-18 17:04:13 +00:00
Nicolas Geoffray
5485d81578 Merge "Remove DEBUG_JIT from Zygote flags."
am: cf49583bd0

* commit 'cf49583bd02d01b5d7aa57912d5469b466722c65':
  Remove DEBUG_JIT from Zygote flags.
2015-11-18 10:54:19 +00:00
Nicolas Geoffray
245ec92b65 Remove DEBUG_JIT from Zygote flags.
The flag is being obsolete by the move to JIT.

(cherry picked from commit 9abbf45c8d)

Change-Id: I3ce4577e81f91e9dd55d44116e0f9e2014bd00b8
2015-11-18 10:07:53 +00:00
Yohei Yukawa
33e81798fa Tell the reason why IMMS unbinds IME client.
As a preparation to fix Bug 25373872, this introduce an additional
parameter to IInputMethodClient.unbind() so that the IME client
that is running in the application side can know why IMMS needs
to unbind the connection.

In future the "unbindReason" parameter is supposed to be used to
optimize the behavior of IMM runtime running in the application process,
but for now it is not used unless we build the sytem with debug message
enabled.  Hence there should be no user-visible change with this CL.

Bug: 25373872
Change-Id: I74e83c8ca9d1d53e31e9c7b5bda1dec6274e59c8
2015-11-17 21:14:42 -08:00
Wale Ogunwale
c02f58f718 Merge changes Ib786d55e,Ibcda3d72
* changes:
  Only add NonClientDecorView when needed
  Move management of BackdropFrameRenderer to DecorView
2015-11-18 00:50:25 +00:00
Wale Ogunwale
8cc5a74c90 Only add NonClientDecorView when needed
We were previously adding it to all decor views because it was
required to be able to draw the resizing backdrop. We now manage
the resizing backdrop independently of the NonClientDecorView.

Bug: 25082500
Change-Id: Ib786d55eacd221e5d36a4afca9117d5409499674
2015-11-17 15:41:05 -08:00
Wale Ogunwale
bf9eefc72f Move management of BackdropFrameRenderer to DecorView
Allows us to have the BackdropFrameRenderer independent of having
a NonClientDecorView.

Bug: 24810450
Change-Id: Ibcda3d722970536ee037b192e90e01da5650ac74
2015-11-17 15:08:33 -08:00