3622 Commits

Author SHA1 Message Date
Adam Powell
9dbe94d8cd Merge "Magic null-background filling for PhoneWindows" into lmp-dev 2014-09-14 22:51:29 +00:00
Adam Powell
f849a5e16d Magic null-background filling for PhoneWindows
In the past it's been a recommended approach to avoiding overdraw for
apps to set their window background to null at runtime if their
content view fully covers their window surface. The problem with this
is the IME.

The IME can force a resize of the window at unexpected times and
unless an app has been configured to fit system windows and manually
cover the padded area that the IME window covers, the asynchronous
nature of the IME-show process can leave surface buffer garbage
visible to the user. In previous platform versions this wasn't an
issue since pre-renderthread we would always animate a crossfade from
the closed to open state. This animation was always a bit of a hack
since it could break the contract of requestLayout/invalidate on the
view hierarchy - it could result in a draw happening into the saved
"before" state of the crossfade before a pending layout.

Now that this has been cleaned up the buffer garbage is sometimes
visible.

To prevent this, PhoneWindow now detects the state of a null window
background and draws solid rects into the area not covered by a
window's content. Which color is determined by the window context's
theme, though this is not a public API available to apps.

Bug 17006497

Change-Id: I714439a1608c4ae135f3d9d49bb165330d9fbe9f
2014-09-14 15:44:11 -07:00
Chet Haase
4605b2929e Merge "set correct bounds in ActionBar based on visibility of ActionBarView" into lmp-dev 2014-09-14 21:30:21 +00:00
Chet Haase
ccd3da23c6 set correct bounds in ActionBar based on visibility of ActionBarView
ActionBarContainer was setting the bounds of its background assuming the
visibility of the ActionBarView. But that view becomes GONE when the
ActionBarContextView is visible, causing artifacts such as wrong shadows
when resized (as in custom configuration changes).

Issue #17280341 Quantum: drop shadow on CAB has wrong width after rotation on L, when configuration change is handled by the app

Change-Id: I07e57f00e27b41d5370cb9440b35734a8ec10f3a
2014-09-14 13:53:10 -07:00
Xin Guan
5ec679a0fa Fix crash in TranserPipe.
Sometimes the pipe has been closed when it's thread tries to access

E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: TransferPipe
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.FileDescriptor android.os.ParcelFileDescriptor.getFileDescriptor()' on a null object reference
E AndroidRuntime: 	at com.android.internal.os.TransferPipe.run(TransferPipe.java:184)
E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:818)

Change-Id: I0fcd4a3334b49972903f2cb0edb51323ba3f49e5
2014-09-14 09:34:40 -07:00
Yohei Yukawa
c68f27625b Merge "Minimize the number of default enabled IMEs part 2" into lmp-dev 2014-09-14 07:48:27 +00:00
Yohei Yukawa
68c860bb29 Minimize the number of default enabled IMEs part 2
Previously the system tried to enable at least one auxiliary IME
even when the system is not ready.  However, this doesn't make
much sense because the user should be able to set up their phone
without auxiliary IMEs. Also, IMEs enabled before the system
becomes ready are kept to be enabled after the system becomes
ready. Thus, we should minimize the number of enabled IMEs
until the system becomes ready.

BUG: 17347871
Change-Id: Ife93d909fb8a24471c425c903e2b7048826e17a3
2014-09-14 13:47:33 +09:00
Tyler Gunn
ead6ad8a38 Merge "Renaming Telecomm to Telecom." into lmp-dev 2014-09-13 17:32:49 +00:00
Yohei Yukawa
c0b8cb8910 Merge "Minimize the number of default enabled IMEs part 1" into lmp-dev 2014-09-13 10:33:50 +00:00
Tyler Gunn
ef9f6f957d Renaming Telecomm to Telecom.
- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: I192cb5d189f55db012ea72ee82ccc5aedbc21638
2014-09-12 22:16:17 -07:00
Dianne Hackborn
a7d0d55771 Work on issue #17477510: Time change notifications sent too often
This gets rid of the spam from the battery history, by not creating
an event unless the wall clock time has changed by more than
+/- 500ms.

We'll do the remaining work in MR1.

Change-Id: I8d1cc41b5504261033d3b0ccdcf9e7cf70df9d04
2014-09-12 17:15:52 -07:00
Yohei Yukawa
5e5c60a43a Minimize the number of default enabled IMEs part 1
Basically this CL does following clean-ups as groundwork.
- Embed isDefaultEnabledIme into its only one caller
- Fix a typo in isSystemAuxilialyImeThatHashAutomaticSubtype()
- Use exit-early style in getMostApplicableDefaultIME()

No behavior change is intended by this CL.

BUG: 17347871
Change-Id: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
2014-09-13 01:16:30 +09:00
Alexandra Gherghina
64d4dca63f Assign default icon to users at creation time and in SystemUI.
Right now different code in System UI, Settings app and other places replace the
user icon with their own default. This tries to make it consistent by moving the
mechanism used in Settings in a helper class.

Bug: 17311038
Change-Id: Ic858c65bf82a98b9806dbba029e7cdcf441f372e
2014-09-12 15:43:42 +01:00
Yohei Yukawa
3fadee4791 API Review: Clean up removed APIs
This CL removes old API signatures marked as @removed
in the follow CLs.
- Ic8c6fab58c01206872a34e7ee604cdda1581364d
- Ia8cbb9f6b41cd9509fc0147fd68763dfde593ffc
- I772c48ff18918e48a81e807b48ff907614485c09

This is just a clean-up CL. No behavior change is intended.

BUG: 17200900
BUG: 17320996
BUG: 17365414
Change-Id: Ibfbd5cc1cdebb8851c73477cff55c9b2d631fdea
2014-09-12 11:32:31 +09:00
Brian Carlstrom
38c29ca3c7 Merge "Add zygote preloading of shared libraries" into lmp-dev 2014-09-11 23:40:33 +00:00
Brian Carlstrom
6c9af96de5 Add zygote preloading of shared libraries
Bug: 17459019
Change-Id: I7cb4ecd0ec9542aa9079420fe158cedca7fca028
2014-09-11 16:36:45 -07:00
Yigit Boyar
dba92d416d Merge "Add support for default content description in DecorToolbar" into lmp-dev 2014-09-11 23:30:47 +00:00
Paul Lawrence
91317107a3 Create correct files in dropbox on encrypted boot
On the minimal framework start, don't mark ro.runtime.firstboot, allowing
the real framework to properly create the dropbox files in the real /data

Bug: 17450632
Change-Id: Ic53b3471b44e69f3eea7e3f3de18e789f51192bc
2014-09-11 12:09:56 -07:00
Dianne Hackborn
023b6812ab Merge "Fix issue #17414533: update batterystats occasionally takes a couple..." into lmp-dev 2014-09-11 00:56:41 +00:00
Yigit Boyar
e91f7c0219 Add support for default content description in DecorToolbar
Bug: 16888338
Change-Id: I0f3f8fcd39cfd29d239801392dd712869749aecf
2014-09-10 17:12:28 -07:00
Dianne Hackborn
652973fca8 Fix issue #17414533: update batterystats occasionally takes a couple...
...hundred milliseconds.

Rework the locking so that no critical paths block on the cpu collection.

Change-Id: Ie615a033f7f8b523b67abee62c581d1a8fce324c
2014-09-10 17:11:22 -07:00
Mathieu Chartier
b4e5061fd6 Change EmptyArray System.identityHashCode to Object.hashCode.
Equivalent behavior, improves performance since
Object.hashCode has a fast path in the java side that does not
require JNI.

According to traceview sampling profiler:
Calendar had 6.8% time in System.identityHashCode during launch.
0.4% time in System.identityHashCode after the change.

Bug: 16828525

Change-Id: I1ed1d1283a990f990b0d4352cc1f4822b1dadf7b
2014-09-10 12:57:29 -07:00
Zoltan Szatmary-Ban
1d38f58990 Merge "Extend IKeyChainService AIDL with CACert retrieval" into lmp-dev 2014-09-09 11:05:45 +00:00
Adam Powell
fd1e93d128 New new design for ResolverActivity
Switch back to using a list as the grid and differently positioned
activity icons were confusing to users. Keep the distinct "last used"
presentation but align icons and titles with the further choices
below. Adjust this to make the fold more apparent. Remember
open/closed slider state across config changes.

Fix some bugs in nested scrolling and flinging.

Bug 17301272

Change-Id: I175937d5821df27b6ac7ffad7f01cd9a6ed3e3e3
2014-09-08 19:25:37 -07:00
Andreas Gampe
6b0ed64fb8 Frameworks/base: Add native bridge post-fork initialization
(cherry picked from commit d7746a8b65ee4690427ed798816f970218578fa3)

Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
2014-09-08 13:07:59 -07:00
Zoltan Szatmary-Ban
f0ae135049 Extend IKeyChainService AIDL with CACert retrieval
Bug:16029580
Change-Id: I41a3bd2f3bd95550e59f1d0d0acd0e765d7b62d7
2014-09-08 17:59:42 +01:00
Jeff Sharkey
e016605981 Merge "Delayed ASEC allocation, refine progress handling." into lmp-dev 2014-09-08 16:38:42 +00:00
Jeff Sharkey
77d218e186 Delayed ASEC allocation, refine progress handling.
For restore use-case, session creation needs to complete quickly, so
delay ASEC allocation until session is opened.  When preflighting
size checks, only consider external when we have a known size for the
container.  Also relax size checks when using MODE_INHERIT_EXISTING
on external, since we don't know how much of existing app will be
copied over.

Consider session as "active" while commit is ongoing, until we're
either finished or pending user interaction.

Always publish first client needle movement away from 0.  Use 25% of
internal progress to reflect ASEC allocation.

Avoid CloseGuard messages about leaking PFDs.

Bug: 17405741, 17402982
Change-Id: I6247a1d335d26621549c701c4c4575a8d16ef8c2
2014-09-08 09:31:49 -07:00
Dianne Hackborn
ce78347c37 Merge "Fix issue #17397177: BatteryStats reporting error on job start/stop" into lmp-dev 2014-09-06 00:49:28 +00:00
Dianne Hackborn
c3940bc1ba Fix issue #17397177: BatteryStats reporting error on job start/stop
Dumb, dumb, dumb mistake.

Also fix battery stats wakeup reason tracking to use a SamplingTimer
(like kernel wake locks) so we can track both the duration and count
for each wakeup reason.

Change-Id: I89d69661006dc533622b1b7e68a139166d3a6975
2014-09-05 17:33:06 -07:00
Anwar Ghuloum
248b369661 Merge "Timing Hacks DO NOT MERGE" into lmp-dev 2014-09-05 14:22:51 +00:00
Anwar Ghuloum
629dc18013 Timing Hacks DO NOT MERGE
Let's submit to see any lingering effects.

Bug: 17310019
Change-Id: I791bceec0b6aa8b80ac4e6c582a10c3f0ec7a906
2014-09-05 07:17:39 -07:00
Adam Powell
c461250424 Menu callbacks for ToolbarActionBars, part 2
Pass through the menu mode change events and make sure Activities get
prepare/open/close events properly.

Bug 17326424

Change-Id: I0ac2f56e4d0054ef01720b2ff1c41ded053750c7
2014-09-04 19:16:39 -07:00
Adam Powell
e50a26f3d8 Merge "Dispatch more menu events to window callbacks from ToolbarActionBar" into lmp-dev 2014-09-05 00:26:30 +00:00
Adam Powell
04c0d46078 Dispatch more menu events to window callbacks from ToolbarActionBar
Wire through the callbacks that result in onPrepareOptionsMenu being
called properly when an activity overflow menu is opened.

Bug 17326424

Change-Id: Ifc5b67af0d215f210bb00326f82f60ba55a36d52
2014-09-04 16:25:26 -07:00
Yorke Lee
135b59e597 Merge "Use TelecommManager APIs to detect if we are in a call" into lmp-dev 2014-09-04 17:27:25 +00:00
Adam Powell
4ef16eaa8d Merge "Change the CAB to use the up-glyph for closing action modes" into lmp-dev 2014-09-04 01:18:14 +00:00
Adam Powell
b2536cf473 Change the CAB to use the up-glyph for closing action modes
In an effort to reduce glyph proliferation, change the "done"
checkmark from the CAB to the up-navigation arrow, placing the CAB
firmly in the current navigation hierarchy. This matches behavior for
expandable action views such as SearchView.

Allow the use of different CAB "done" layouts by theme; the material
layout should not include the "done" text and should use the standard
borderless selectable item background.

Bug 17372188

Change-Id: Icfb3e0bbc6a718e22ab27f9d520da5fe4eb833e7
2014-09-03 17:17:45 -07:00
Yorke Lee
cc5179f0e3 Use TelecommManager APIs to detect if we are in a call
Bug: 17335666
Change-Id: I5f443c76041e51a2eca903db924fb26031dde055
2014-09-03 17:04:54 -07:00
Alan Viverette
98a31b2ef0 Merge "Only use default backgrounds when not extending AlertDialog style" into lmp-dev 2014-09-03 23:42:42 +00:00
Alan Viverette
b17c6c178f Only use default backgrounds when not extending AlertDialog style
BUG: 17368867
Change-Id: I440dad33cfb093c13b450a5f2369481fb30665ad
2014-09-03 16:27:51 -07:00
Dan Sandler
d1dc910eff Merge "Reduce RAM requirements of grayscale icon testing" into lmp-dev 2014-09-03 22:15:38 +00:00
Dan Sandler
05c362d564 Reduce RAM requirements of grayscale icon testing
The isGrayscale family of methods is designed to identify
drawables and bitmaps that apps are using in the largeIcon
position to pose as small icons in order to get the
appropriate background treatment (a solid blue or gray block
in KK/JB, or geniune selvedge denim in ICS/HC).

We can optimize this search two ways:

(1) Reject immediately any largeIcon that is larger than
    largeIcons should be (64x64dp). We could one day simply
    reject, or resize, these in the notification manager,
    but regardless these are not plausible smallIcon
    subsitutes. This new constraint is commemorated in the
    new name, isGrayscaleIcon().

(2) Shrink the bitmap even smaller before scanning it slowly
    in Java.  This lets native_drawBitmap do the heavy
    lifting across the entire bitmap; we need only scan a
    few pixels.

Bug: 16513124
Change-Id: I3a2b79130ed2465a4aedfbb5a556db7f8a7aa132
2014-09-03 23:52:47 +02:00
Yohei Yukawa
d8636ea7ca API Review: InputConnection
This CL does nothing but rename some L API candidates
in InputConnection class, as per requested.

- requestUpdateCursorAnchorInfo()
  -> requestCursorUpdates()
- REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE
  -> CURSOR_UPDATE_IMMEDIATE
- REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR
  -> CURSOR_UPDATE_MONITOR

BUG: 17320996
Change-Id: I772c48ff18918e48a81e807b48ff907614485c09
2014-09-02 22:39:08 -07:00
Adam Powell
12b0321c0b Automatically supply a content description for ToolbarActionBar nav
If the developer hasn't set a navigation content description on the
Toolbar assigned to be an action bar or a home-action content
description via the ActionBar interface, use the framework default
"navigate up" string.

Also make sure that the default Up description is supplied in the
screen_toolbar window decor layout and that it is parsed properly in
all toolbars, even if we don't have an icon set during construction.

Bug 17298370

Change-Id: Ie2f9e34f92046d4d4ffb9a07e38fa89581891f7b
2014-09-02 16:20:08 -07:00
Adrian Roos
1572ee379e Trust: Look at the security unlock method of the right user
Follow up to Ic9e93862c722ebc529f5b2010b9cea941f569ce7.

Bug: 17107213
Change-Id: I8f3c19aedeaca3f265c98a4fb60ab74b115fca47
2014-09-01 23:03:28 +02:00
Adam Lesinski
cc562a811d Make UsageStats API comply with API Council
- Fix documentation to mention units of time in APIs.
- Return a Map instead of an ArrayMap

Bug:17289531
Change-Id: I0a2cfdc0bc003eeeb65a16e37bb7b991624b2853
2014-08-29 12:52:41 -07:00
Yohei Yukawa
72d35fa829 Reject request when any unknown flag is speficied
Currently EditableInputConnection#requestUpdateCursorAnchorInfo
never returns false unless InputMethodManager is somehow
unavailable.

This is problematic, especifially when we add a new flag to
EditableInputConnection#requestUpdateCursorAnchorInfo in a
future release.

With this CL, #requestUpdateCursorAnchorInfo does nothing and
immediately returns false when one ore more unknown bits are
specified.

BUG: 17324806
Change-Id: I5601714b481e8efa0ad3337c0d093cfcf55eade3
2014-08-29 00:57:19 -07:00
Dianne Hackborn
2db754ac6e Merge "Fix issue #17289876: startActivityFromRecents appears to launch the wrong task" into lmp-dev 2014-08-28 19:33:08 +00:00
Dianne Hackborn
d7c9289f93 Fix issue #17289876: startActivityFromRecents appears to launch the wrong task
It would be good to actually bring the task to the front.

Also, make the flow when inTask is provided better match what happens when
we go looking for a task on our own.

And this includes another fix that was supposed to be part of a different
change but I forgot this class is part of the framework project now.

Change-Id: I3cf05f2e585c0fd7a0dbb7c7cf9fb1655764dd93
2014-08-28 11:38:13 -07:00