The APIs are:
* setting a listener for the area of the caption where we display
control buttons; this is intended for apps that overlay the caption on
their content, so they don't display the content in that area and clash
with the buttons;
* specifying the color pallete of controls in the caption; by default we
try to infer the best color from the theme (dark buttons for light theme
and vice versa), but in case we get it wrong, we allow the developer to
overwrite it;
* specifying the caption background during the resizing; by default we
try to infer a good color from the theme, but in case we do it wrong, we
allow the developer to overwrite this.
The CL also includes merging of layouts decor_caption_dark and
decor_caption_light into a single one. Not only it reduces code
duplication, but also is necessary for allowing adjustment of the
controls color pallete after the layout was created.
Bug: 25486369
Bug: 25818398
Change-Id: Ib87fe849b07df341893ec7873982bf7ab932f6d5
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.
The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.
This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.
Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
When the system sends broadcast intents, it's in a very authoritative
position, and many apps blindly trust the sender. This is why we've
historically had the concept of "protected broadcasts" which can only
be sent by the system.
However, it's far too easy to send new broadcasts from the system
without adding them to the protected list. This CL adds logic to help
catch those cases. Currently it just logs the error and continues
sending the broadcast.
Based on boot analysis of a typical device, add 36 new protected
broadcasts.
Bug: 24571095
Change-Id: Ie2cc6b0b2026e67c64730af897e4eb3e0e8404f1
AAPT wrongly allowed a style parent to be an attribute. This will not
do any runtime dynamic parent resolving and will result in an incorrect style.
Bug:26061260
Change-Id: Id5d43e5786a64ff939b69a2d84e53733db6baf29
Quiet mode means the user will be free from visual and audio interruptions
from apps inside the managed profile, including notifications, widgets and
others. This CL adds the underlying state bit to users and exposes various
APIs to control and query the quiet mode state.
Bug: 22541941
Change-Id: If5f8e5a897843050e83b6ec26cb39561098f12b9
This change excludes the Google Wallet dedicated short code (being used
by the Google Wallet team to send notifications to users) from
premium phone numbers. Users may answer the text message free of charge
(e.g. answering HELP). Google internal reference b/25675421.
Change-Id: Ic022ccc19151224b53c8a35c9568e9b943d8220d
What this CL actually does is just copying the existing concept
"subtypeId" from InputMethodSubtype to SpellCheckerSubtype.
To recap, the underlying problem is that the system has stored only the
return value of SpellCheckerSubtype#hashCode() to track the set of
enabled subtypes, and SpellCheckerSubtype#hashCode() has been
implemented as Arrays.hashCode(new Object[] {locale, extraValue}), which
is problematic because:
- Spell checker developers cannot change "locale" and/or 'extraValue'
if they want to keep enabled subtypes enabled.
- Android Framework developers cannot change the hash function even
when new fields are added if they want to keep enabled subtypes
enabled.
InputMethodSubtype has had the same issue, and what we did was
introducing a concept "subtypeId", which allows IME developers to
specify the return value of #hashCode().
For instance, suppose that a subtype X has already been used in
production with the following attributes:
- locale: "tl_PH"
- extraValues: "key1=value1,key2=value2"
With "subtypeId", you can change the attributes of subtype X without
losing the enabled state of subtype X on devices as follows.
- locale: "fil_PH"
- extraValues: "key1=value1,key2=value2,key3=value3"
- subtypeId: Arrays.hashCode(new Object[] {
"tl_PH", "key1=value1,key2=value2"})
This CL also deprecates existing public constructor of
SpellCheckerSubtype, which was probably published as a public API by
mistake. Note that the constructor of SpellCheckerInfo class is @hide.
Also there is no public API that receives SpellCheckerSubtype object
instantiated by developers with custom data. Making developers to be
able to instantiate SpellCheckerSubtype does not make sense right now.
Bug: 11736916
Bug: 22858221
Change-Id: I98f05c1e9421c47a93769bc4a6fe11b678bc2509
This commit adds configurable support for lockscreen
behaviour when the user has a device cover/lid. This
is intended for lids with a viewing window so that the
user can see the time and interact with apps via the
window.
Change-Id: Id71883f66d1a180c4732912b3b59cabf9f4d7b6e
* changes:
Drag up gesture improvements
When dragging from the left side, dock on the right
Draw status bar background in BackgroundFrameRenderer while resizing
Don't remove colored bar views when relaunching
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
- add config to lock UI mode change: When this is enabled,
request to change car mode will be ignored. Apps can check
the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
apps cannot change day / night mode without having
MODIFY_DAY_NIGHT_MODE permission.
Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
and mode change
- All new configs have default values which keeps the current behavior.
Car products should override the configs to get desirable behavior.
bug: 22700993
Change-Id: Ic0e58f3428151e0b1c19a2e9a7d6ded32ff962a6
This API allows a single assistant on the device to help the
user manage their notification stream by taking actions on
individual notifications:
- modifying their priority up or down when they are posted
- possibly changing if and how the notification interrupts the user
- adding annotations under notifications
Bug: 22455414
Change-Id: Idf47972bb71c83f1dc1c9ec68a6fa92ac4fc522f
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.
Bug: 25757239
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
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
Previously the notification header had a seperate implementation
in SystemUI from which the platform implementation was derived.
Now that everything is in the framework, we’re migrating the
implementation for notification groups.ß
Change-Id: Ia61a75bd6c85e1805d4364a9e7e4587a020c1271
If there is an image instead of applying the same
margin everywhere, the text now floats around the
image.
Change-Id: I87f9ca9f51fb270b0732a99374544381bd1fc4e0
The padding was off in a few cases and the layout
was jumping when expanding when there were actions
Change-Id: Ia9a9ddbfd1c9a8104278a56ce6e1ef2a4ceafbe9