Commit Graph

4498 Commits

Author SHA1 Message Date
Yohei Yukawa
648abe1565 Merge "Set DISABLED_UNTIL_USED for the correct user in IMMS." into mnc-dev 2015-06-22 17:59:42 +00:00
Yohei Yukawa
094c71fd5c Set DISABLED_UNTIL_USED for the correct user in IMMS.
This CL makes If8ff1b2b95c36d33148def2ab87bd006aa520cc0
multi-user aware.

It turns out that DISABLED_UNTIL_USED has not been correctly
set to IMEs seen from secondary users because we have used
  IMMS#mContext.getPackageManager(),
which always returns the PackageManager with the primary
users' context, when specifying
COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED.

We should use IPackageManager instead as we have already done
in many places of IMMS since Ib23849d352db33f0747aa9d5a178f00.

Bug: 8148605
Bug: 8365223
Bug: 21953608
Change-Id: I4b9d6510bf965204bb1f68c8b527d1a4df23fac4
2015-06-20 00:41:31 -07:00
Adam Powell
b3add4dae2 Merge "Fix regression in viewing app info from ChooserActivity targets" into mnc-dev 2015-06-20 00:46:04 +00:00
Adam Lesinski
9425fe21c9 BatteryStats: Record doze wake locks
Doze wake locks don't actually hold the CPU awake, so we should record them
separately from full wakelocks, which is what we did before.

Bug:21949905
Change-Id: Ib4db3399069e0ad11f1f0dc6925a87ad0ad21ff9
2015-06-19 14:12:01 -07:00
Adam Powell
98b7f89430 Fix regression in viewing app info from ChooserActivity targets
Also add metrics logging to ChooserActivity

Bug 21953567
Bug 21953720

Change-Id: I6bba2cfe9b9e551e6fe6f2d4f92fc040eebf355c
2015-06-19 12:38:45 -07:00
Adrian Roos
4f43dc042b Assist disclosure
Add an animation that discloses delivery
of contextual data to the assist component.

Also fixes a bug where contextual data was
delivered to legacy assist activities even
though the user explicitly disabled context.

Bug: 21568059
Change-Id: I27dfaa36e2f677b0d73acfa4730f0f4ea3486919
2015-06-19 11:33:05 -07:00
Abodunrinwa Toki
6983752a10 Merge "Better FloatingToolbar positioning." into mnc-dev 2015-06-19 18:28:20 +00:00
David Srbecky
f32f7a3ffd Merge "Replace --include-cfi with --generate-debug-info." into mnc-dev 2015-06-19 18:26:42 +00:00
Abodunrinwa Toki
9ae95dff1d Better FloatingToolbar positioning.
-The toolbar is now rendered over the IME.
-The toolbar respects the presence of the IME and tries as much as
 possible not to obstruct it.
-The toolbar may obstruct the IME if there is limited space and we
 can't find a position that won't obstruct the IME.

*A side effect of the toolbar over the IME is that TextView handles
 will also always be rendered over the IME where necessary. This was
 the previous behavior before the regression.

Bug: 17510971
Change-Id: I26a49565bf025d7c007ba6bb80468c4988fcc051
2015-06-19 19:15:50 +01:00
Abodunrinwa Toki
07e440b278 Merge "Fix FloatingToolbar flickers." into mnc-dev 2015-06-19 14:26:11 +00:00
Andrei Stingaceanu
50057943fb Merge "Cannot select text after rotation in extract mode" into mnc-dev 2015-06-19 09:33:04 +00:00
Sudheer Shanka
a408061cc7 Merge "Use the intent filter icon in ResolveInfo for managed profile." into mnc-dev 2015-06-19 09:25:59 +00:00
Adam Lesinski
8b156e37d5 Merge "BatteryStats: Update external stats individually." into mnc-dev 2015-06-19 01:22:53 +00:00
David Srbecky
065075e1f9 Replace --include-cfi with --generate-debug-info.
This follows a change in dex2oat.

(cherry picked from commit f39477b592)

Bug: 21924613
Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
2015-06-19 02:20:06 +01:00
Adam Lesinski
a7c90c84e4 BatteryStats: Update external stats individually.
When wifi traffic causes a stats collection, we shouldn't care about
cpu or bluetooth updates.

Bug:21478443
Change-Id: I177dc0fc09951813cb4a702ad0e5d951d69f8c22
2015-06-18 18:13:36 -07:00
Dianne Hackborn
0348ba2e23 Merge "Fix issue #20494208: Go out of device idle when headset button is pressed" into mnc-dev 2015-06-19 01:01:38 +00:00
Adam Lesinski
00fac63575 Merge "BatteryStats: Fix regression in wakelock power distribution" into mnc-dev 2015-06-19 00:57:47 +00:00
Dianne Hackborn
b6683c4286 Fix issue #20494208: Go out of device idle when headset button is pressed
Rework how we record active transitions in battery stats to be
more general, and add an API that others can call in to
DeviceIdleController to request that we go out of idle mode.
use this for VOICE_SEARCH_HANDS_FREE.

Change-Id: Ie58de60e63036a4142881283835961fbcceec892
2015-06-18 17:40:33 -07:00
Alan Viverette
b0ff3a6cb3 Merge "Ensure ResolverDrawerLayout is visible to accessibility services" into mnc-dev 2015-06-18 21:37:55 +00:00
Alan Viverette
f45befe6c3 Ensure ResolverDrawerLayout is visible to accessibility services
Also removes the class name since it's not helpful to expose framework
internal class names to accessibility services that can't access them.

Bug: 18864087
Change-Id: If9b29d3929970bd893168444584a5dd1ba593c5b
2015-06-18 14:20:35 -07:00
Dan Sandler
50ec9b1bd9 Merge "Patch up certain kinds of broken notifications." into mnc-dev 2015-06-18 20:26:49 +00:00
Chris Wren
5e275f9fc0 Merge "instrument volume controls" into mnc-dev 2015-06-18 19:57:50 +00:00
Dan Sandler
4e78706f43 Patch up certain kinds of broken notifications.
Notifications in which the icon resource ID is changed after
Builder.build() is called (even, and particularly, as the
last step in the current implementation of
setLatestEventInfo()) were not having their icons properly
parceled. In these cases we now attempt to catch this at
parcel time and construct the necessary Icon object.

But wait! Parceling does not require a Context. So we don't
actually know which package to load the resource from.
Therefore we now allow an Icon to be constructed with an
empty ("") package name, which allows us to complete this
parceling task despite the fact that a Notification does not
know its own package name. (In case you attempt to load a
drawable for such an Icon, loadDrawable will spot the ""
package and instead substitute the Context from its
parameters to try to load the resource.)

As it happens, even though the Notification does not know
its own package name, BaseStatusBar does, because it was
provided at NM.notify() time and is therefore included in
the StatusBarNotification structure. So we can actually
patch up the Icon (if it is TYPE_RESOURCE) and be sure to
get the icon loaded out of the correct package.

While we've got the hood open, this change fixes a couple of
related problems:

  • Foreground service notifications synthetically
    constructed for naughty icon==0 notifications (which we
    are still allowing...FOR NOW) were losing the
    FLAG_FOREGROUND_SERVICE flag (because we're
    re-build()-ing them from scratch rather than rewriting
    the provided Notification object). Now we set the flag
    and hang onto the new notification for next time
    setForeground() is called.

  • We now allow media notifications to avoid getting bumped
    to the top of the notification list if they're
    PRIORITY_MIN. You might want to do that, I guess?

Bug: 21333763
Change-Id: Ia5d1f1acb594c7677bcc75ee3d624da4ffca671f
2015-06-18 15:12:44 -04:00
Adam Lesinski
72478f053f BatteryStats: Fix regression in wakelock power distribution
We used to give 50% of the cpu time of each app to any app holding a wakelock
while the screen is off.
Since we switched to the new kernel module for measuring app's cpu time, this distribution
was lost.

Bug:21876567
Change-Id: I42c294547f63d150d9929271ca0e27fedaaa9d77
2015-06-18 12:09:25 -07:00
Clara Bayarri
6bc1224448 Fix Select All Option is truncated when device goes from landscape to portrait
We were not taking into account configuration changes to update the
available space for the toolbar.

Bug: 21816857
Change-Id: I0f346e8eecb66ab788d1500239d5c1e020b87f97
2015-06-18 11:58:12 +01:00
Hyunyoung Song
0ff78e7cc8 Merge "AppWidgetServiceImpl should use ParceledListSlice as return object b/19904873" into mnc-dev 2015-06-18 05:58:36 +00:00
Abodunrinwa Toki
972ab4f858 Fix FloatingToolbar flickers.
This is fixed by avoiding calling toolbar.show() in PhoneWindow.
FloatingActionMode coordinates whether or not the toolbar should be
visible. PhoneWindow differs to it.

This CL also adds a new API:
ActionMode#onWindowFocusChanged(boolean)

Bug: 21617792
Change-Id: Ic49ce1000ce9c782d0f9e17e3d024d462c7b758b
2015-06-18 03:16:21 +01:00
Abodunrinwa Toki
e8378476b5 Merge "Allow content rect to overshoot the bottom view bounds by 20dp." into mnc-dev 2015-06-18 01:05:07 +00:00
Adam Powell
40359f73b1 Merge "Request application of WindowInsets when setting a content view" into mnc-dev 2015-06-17 22:42:17 +00:00
Hyunyoung Song
ccf6c68147 AppWidgetServiceImpl should use ParceledListSlice as return object
b/19904873

> Reason: to prevent TransactionTooLargeException from occuring when
binder transaction size goes over the limit.

Change-Id: I054cb161d235234f3ccdaadd70314163e690b0db
2015-06-17 15:23:31 -07:00
Adam Powell
41607d5a2b Request application of WindowInsets when setting a content view
For both PhoneWindow and VoiceInteractionSession, call
requestApplyInsets when the content view(s) change. This is generally
what the developer expects if the new view tree responds to insets in
any way.

Bug 21620924

Change-Id: I60a88af55bf85217c3587aa37f03fdc3fdce686d
2015-06-17 13:37:06 -07:00
Chris Wren
e565ee6ccb instrument volume controls
Bug: 21474639
Change-Id: I48641ae778f4e274c0f67ca6491102d978d3cd5f
2015-06-17 15:27:38 -04:00
Andrei Stingaceanu
da589dffdd Cannot select text after rotation in extract mode
The InputConnection did not report the fullscreen mode to
the InputMethodManager if the connection was not active
which ended up feeding the Editor false information about
when extracted mode will be started.

Bug: 21455064
Change-Id: Id10315efc41d86407ccfb0a2d3956bcd7c0909b8
2015-06-17 10:48:46 +01:00
Matthew Williams
15ce33873e Merge "Make sync settings restore more robust" into mnc-dev 2015-06-16 22:36:53 +00:00
Abodunrinwa Toki
15a6c89f46 Allow content rect to overshoot the bottom view bounds by 20dp.
Bug: 21816429
Change-Id: I84013286896d145c9501351bc6a638cbda12e8c0
2015-06-16 23:27:55 +01:00
Matthew Williams
53abfdb86c Make sync settings restore more robust
Bug: 18506992
Parent Bug: 17967106
Introduce a new state for ContentResolver#getIsSyncable.
This state specifies that an adapter should be disabled until
explicitly turned on by ContentResolver#setSyncAutomatically(true).
In this way we can restore disabled sync adapters and still allow
them to run their initialization logic later on when they are
re-enabled.

Change-Id: I03fd1f994c4bc982bbc723154ba20bb252efdf80
2015-06-16 14:46:59 -07:00
Adam Powell
26b27cab81 Merge "Fix crash in ToolbarActionBar when setting null custom view" into mnc-dev 2015-06-16 21:29:48 +00:00
Abodunrinwa Toki
f444b5c3ae Fix floating toolbar flickers.
-Flicker was a side effect the delay in hiding the toolbar when
there is a down press on a TextView handle. The timing clashed
with the time it takes for the FloatingActionMode to release a
hide lock on a changing content rect. Extra flickers also happened
if the ActionMode happened to be invalidated at about the same time.
Since there was no longer a hide lock, the toolbar refreshed, getting
rid of the "Select all" menu item.
FIX. I believe we don't need the delayed hide on down press on a
TextView handle. I've removed this.

-I've also updated FloatingActionMode to ensure that hide locks
overlap one another if necessary. The toolbar can only be visible if
all locks are off.

Bug: 21793687
Change-Id: I290ea45ab17d5862b453cb319afb4c8ffe084cd0
2015-06-16 15:47:04 +01:00
Abodunrinwa Toki
6161c5b4cd Merge "Floating toolbar no longer obstructs the soft keyboard." into mnc-dev 2015-06-16 12:29:55 +00:00
Narayan Kamath
fbb32f6440 Better systrace slices for application startup.
This change adds three new timeslices :

- PostFork : As soon as possible after the app forks from the
  zygote. Can be used in conjunction with the system_server
  "Start proc:" event to derive an upper bound on fork() and
  zygote overhead.

- RuntimeInit & ActivityThreadMain for ZygoteInit#runtimeInit
  and ActivityThread#main.

ActivityThread#handleBindApplication and higher level functions
are already well instrumented in systrace. handleBindApplication
should occur immediately after ActivityThread#main.

Note that we use the Activity manager tag to make it easier to
correlate these new events with surrounding events (Start proc
and handleBindApplication) that are already using the AM tag.

bug: 21632700
Change-Id: Ibc01f1721f962c913f3c02a51763b6feb1eb6a4d
2015-06-16 12:06:31 +01:00
Adrian Roos
e91750804a Add AssistUtils
Enables code sharing with Settings for consistent
default value handling.

Bug: 21780590
Change-Id: I669b673f90fab503ae0c2179f09ebac9592bd33a
2015-06-15 16:07:48 -07:00
Adam Powell
c5ed395e4b Fix crash in ToolbarActionBar when setting null custom view
Bug 21291849

Change-Id: I54a4084b2b146ce7fb9dfe92023e9a1ad23f7902
2015-06-15 14:11:42 -07:00
Abodunrinwa Toki
6d2b75c86d Floating toolbar no longer obstructs the soft keyboard.
-The toolbar popupwindow is set to "need" the keyboard
-Updated toolbar positioning bounds
-Updated toolbar positioning depending on available space

Bug: 21304845
Change-Id: I8d8a59ef6ea639b11bb32cfeb6ead52087fb91e4
2015-06-15 20:45:30 +01:00
Jim Miller
1035833fc6 Merge "Improve LockPatternView accessibility" into mnc-dev 2015-06-13 01:10:21 +00:00
Adam Lesinski
87a79c394d Merge "BatteryStatsHelper: Fix some lost power" into mnc-dev 2015-06-12 23:17:47 +00:00
Adam Lesinski
57123001a4 BatteryStatsHelper: Fix some lost power
Looks like we were losing some power calculations from the CPU side of Bluetooth and
WiFi if there was no controller activity ocurring.

Also add finer breakdown of power to BatteryStats dumpsys for WiFi and Bluetooth.

Change-Id: Ic3ce3e4e3b854f17f9a32fd4bdc47a8ea74ca439
2015-06-12 16:12:07 -07:00
Doris Liu
0b9fd85f8f Merge "Change ActionBar animtion from/to ActionMode" into mnc-dev 2015-06-12 21:31:48 +00:00
Doris Liu
94283533ab Change ActionBar animtion from/to ActionMode
This CL changes the animation going from/to ActionMode per UX request.
The previous animation uses a combination of scale and translation
animation, whereas the new animation uses fade-out and then fade-in
(no cross-fade) for the action bar transition.

Bug: 20882034
Change-Id: I06286a215d058ed6f9f2023a4f0bcc60fa7ef46f
2015-06-12 14:21:30 -07:00
Adam Powell
de64ac4599 Merge "Check targetSdkVersion when passing size hints for UNSPECIFIED specs" into mnc-dev 2015-06-12 00:45:23 +00:00
Navtej Singh Mann
3c0ce5ca14 fix ArrayIndexOutOfBoundsException while starting WifiScannerScan
bug: 21663831
Change-Id: I9aea30907aae00c98d8fb1dc1fff3f4935108fa4
2015-06-11 17:04:15 -07:00