Commit Graph

7277 Commits

Author SHA1 Message Date
Kang Li
b431d715a3 Merge "Add Sharing Histories to UsageStatsManager." 2016-12-14 19:26:34 +00:00
Kang Li
53b4314ad9 Add Sharing Histories to UsageStatsManager.
This CL is for Android O Smart-Sharing (b/30982298). By this CL, sharing
counts are logged with UsageStatsManager.

Bug: 30982298
Test: manual - shared images in Camera and texts in Chrome using a mobile device.

Change-Id: I0b4aa0506f99b3083d140a48f7b4bdd5b1c5afb6
2016-12-13 17:35:38 -08:00
TreeHugger Robot
6c634feae0 Merge "Fixing issue in current and max duration calculations." 2016-12-13 21:03:30 +00:00
Kweku Adams
47db5a8bf7 Fixing issue in current and max duration calculations.
It looks like one operation was done out of order and some of the times used in
the calculations were leading to incorrect results.

BUG: 31023263
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsDurationTimerTest

Change-Id: I417cc28c5a55748067b6c7f682a66fe3dbc09f09
2016-12-13 19:17:44 +00:00
Hakan Seyalioglu
7317e8abcc Don't auto-launch if switching to managed account
When the user picks the option to switch to a managed account, avoid
auto-launching the activity if there's only a single activity to pick
from.

Bug: 32669623

Test: Manual
Change-Id: Ieaed5885385929297304506ca2d5839e77043a64
2016-12-13 10:07:14 -08:00
TreeHugger Robot
d3e2ba3017 Merge "Fix blink of final position in activity transitions." 2016-12-12 16:41:43 +00:00
Jeff Sharkey
c5b5694202 Merge commit '7797e545239e81a9216994527badcc98178ebfcc' into dec10
Change-Id: I430a39241bd2d278eaf1e01b89be3ad368789f6d
2016-12-10 16:29:23 -07:00
Jeff Sharkey
7797e54523 Merge "Final push of installd to Binder; goodbye socket!" am: 1950377f91 am: 104fd011b2
am: 9ff67746e6

Change-Id: Idc2b65f975b80c4768280515bd35727644fb5711
2016-12-10 23:13:30 +00:00
Jeff Sharkey
9ff67746e6 Merge "Final push of installd to Binder; goodbye socket!" am: 1950377f91
am: 104fd011b2

Change-Id: I4b2ae2329e8842def8682199c5ee8544c22c2be4
2016-12-10 23:07:59 +00:00
Jeff Sharkey
104fd011b2 Merge "Final push of installd to Binder; goodbye socket!"
am: 1950377f91

Change-Id: If10d4f4aafa68b78ddd9a98e8699fe008bbda49b
2016-12-10 23:01:59 +00:00
George Mount
f9c4b57b02 Fix blink of final position in activity transitions.
Bug 33059372

When implementing OneShotPreDrawListener, one of the onPreDraw()
calls was supposed to return false. This CL restores that behavior.

Test: manual against Play Movies app

Change-Id: I416da3bb3e84efb009f0efbacad71d0a2f66fe18
2016-12-09 16:51:35 -08:00
Jeff Sharkey
740f523b25 Final push of installd to Binder; goodbye socket!
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.

Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug: 13758960, 30944031
Change-Id: I9afb9f71858febde34a94f53839b2986493b68a0
2016-12-09 15:30:34 -07:00
Jeff Sharkey
0d0bbd01e9 Merge "Prepare to move dexopt calls to Binder." am: d7b144a5e9 am: 35cbe8ffb0 am: 41d75809aa
am: 67c8b01f4d

Change-Id: I1a746e34856b8fa1471ccacd3a8bde1d06866679
2016-12-09 17:08:18 +00:00
Jeff Sharkey
67c8b01f4d Merge "Prepare to move dexopt calls to Binder." am: d7b144a5e9 am: 35cbe8ffb0
am: 41d75809aa

Change-Id: I0b87126b4b312ef8fc3c71479d6d5725e96e6acc
2016-12-09 17:03:41 +00:00
Jeff Sharkey
41d75809aa Merge "Prepare to move dexopt calls to Binder." am: d7b144a5e9
am: 35cbe8ffb0

Change-Id: Ice3c37568ae7185dfe028d3019abf5204aa93963
2016-12-09 16:58:48 +00:00
Jeff Sharkey
35cbe8ffb0 Merge "Prepare to move dexopt calls to Binder."
am: d7b144a5e9

Change-Id: I49cce8519d5b09a646609fffc6e62ecbe1a086ef
2016-12-09 16:53:46 +00:00
Jeff Sharkey
d7b144a5e9 Merge "Prepare to move dexopt calls to Binder." 2016-12-09 16:42:25 +00:00
Hugo Benichi
05ad47add8 DO NOT MERGE: TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee)

Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031
2016-12-09 11:21:29 +09:00
TreeHugger Robot
ac30b3bb5f Merge "Replace Toast-based cheat sheets with tooltips" 2016-12-08 19:25:53 +00:00
Jeff Sharkey
c98c7bccdc Prepare to move dexopt calls to Binder.
Since InstallerConnection is about to be replaced by a new installd
Binder interface, this change moves OtaDexoptService to override and
manually cook up the 'dexopt' command line that it expects to collect
from PackageDexOptimizer.

Since OtaDexoptService is designed to be run in isolation, add a new
mode to Installer which ignores calls that aren't being intercepted.

Also moves to a single dexopt() method instead of having overloads.

Test: builds, boots, fake OTA works
Bug: 13758960, 30944031
Change-Id: I3a6a115289f1542d6df3e2993b9720118b7d1e8d
2016-12-08 09:11:50 -07:00
TreeHugger Robot
55abee314c Merge "MessagingStyle: Fix buggy measure in MessagingLinearLayout" 2016-12-08 01:00:10 +00:00
Adrian Roos
c6a43b1e0b Notifications: Fix bad layout for long texts am: 62be439d26
am: 52e364e4ba

Change-Id: I299401ef2627cbf55332cc0648398e19f25b594f
2016-12-08 00:44:27 +00:00
Adrian Roos
52e364e4ba Notifications: Fix bad layout for long texts
am: 62be439d26

Change-Id: Ia0f6fe64cc853dcdaf84910055cf5a8b1e163ddd
2016-12-08 00:35:59 +00:00
Adrian Roos
4ac8f40d96 MessagingStyle: Fix buggy measure in MessagingLinearLayout
Fixes a bug in MessagingLinearLayout where we would not
recompute the height of it after applying the computed
insets to the text views, leading to incorrect padding
and in rare cases a cut off message at the bottom.

Change-Id: If87a527555158e94e501832e9f49e380cc7da2bb
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/MessagingLinearLayoutTest.java
Fixes: 31463075
2016-12-07 15:16:19 -08:00
Ned Burns
3dc8814e04 DO NOT MERGE Fix android:noHistory for Wear am: d7a313fb11
am: 5207e1cff1

Change-Id: Ie5ed01b9161da8ecf0e6b4ec92be71e941cc966c
2016-12-07 21:20:15 +00:00
Ned Burns
6a860f7f3b DO NOT MERGE Fix android:noHistory for Wear
am: d7a313fb11

Change-Id: I4de91badcff2690e701d3c46edf3b06498b003ee
2016-12-07 21:14:36 +00:00
Jeff Sharkey
ba6f8c8bef Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

(cherry picked from commit 850c83e6da)

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088

Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5

Change-Id: Ic2be10dc8478d613cea6e2c976b9987c250b86b7
2016-12-07 12:24:21 -08:00
Ned Burns
d7a313fb11 DO NOT MERGE Fix android:noHistory for Wear
Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.

Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.

This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.

Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.

Bug: 33252029

Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
2016-12-07 15:05:25 -05:00
Adrian Roos
62be439d26 Notifications: Fix bad layout for long texts
Fixes a bug where the max lines restriction was not properly
passed to ImageFloatingTextView's layout, causing the TextView
to improperly apply bottom padding.

Change-Id: Ibe07515866a4599047712a0482332ed4430c9056
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java
Fixes: 32658499
Bug: 32658499
2016-12-06 14:17:06 -08:00
Vladislav Kaznacheev
b265617b81 Replace Toast-based cheat sheets with tooltips
Currently ActionMenuItemView, MediaRouteButton and
ScrollingTabContainerView each have their own
implementation of a Toast-based long-press tooltips
(the last two apparently copy/pasted from the first).

Replacing those with the recently introduced tooltips
supported by the framework.

Bug: 31516506
Test: manual in ApiDemos
Change-Id: Ibcb8c5a43577a8b4d30f1a26e48ddcfde015d1dc
2016-12-06 11:41:58 -08:00
Ned Burns
df1710dc6e Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de am: f9566827f2
am: 768f62aac1

Change-Id: Ibe1a8b9a7cf71b715ae7d4e0157b5cdf1d52e81d
2016-12-06 02:48:01 +00:00
Ned Burns
768f62aac1 Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de
am: f9566827f2

Change-Id: I157e10afa6b8c0414c2af25d98bf5913928925f2
2016-12-06 02:38:47 +00:00
Ned Burns
081fd25237 Modify SwipeDismissLayout to perform its own exit animation
am: 7d6cb913de

Change-Id: Ie9784fa9b7c878371f1e12acbb362b36fc66e023
2016-12-06 02:33:23 +00:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
Jeff Sharkey
a909053664 Move dump() to dumpAsync(), more oneway calls.
am: c06f184ae9

Change-Id: I1f060cb7e20c732e7c6da412e2e9fb7335011ec8
2016-12-05 20:51:52 +00:00
TreeHugger Robot
5e2155058d Merge "Move dump() to dumpAsync(), more oneway calls." into nyc-mr1-dev-plus-aosp 2016-12-05 20:45:00 +00:00
Michael Kwan
319cfe16f1 Disable swipe-to-dismiss for not cancelable dialogs. am: f7964be938 am: 85ba660b16
am: 1805ba1d76

Change-Id: I23863328b64f95915a7ecb7ceb35448bc10bdfbe
2016-12-05 18:21:14 +00:00
Michael Kwan
85ba660b16 Disable swipe-to-dismiss for not cancelable dialogs.
am: f7964be938

Change-Id: I6d71bb4c6acdc9d994766eebd7a6320356aa3a23
2016-12-05 18:09:10 +00:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
Jeff Sharkey
c06f184ae9 Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
2016-12-02 15:17:20 -08:00
TreeHugger Robot
e9278712ac Merge "Allow system_server to measure emulated stats." 2016-12-02 22:42:13 +00:00
Jeff Sharkey
053a909fd8 Allow system_server to measure emulated stats.
Historically we pushed all system_server SD card interactions through
DefaultContainerService to avoid holding open FDs, but it's safe to
measure disk usage for internal emulated storage when looking
directly at /data/media, since there is no risk of unsafe ejection.

Test: builds, boots, and access allowed
Bug: 33298975
Change-Id: I1491065aad47cd16e7fdd586bce021ff61c003c6
2016-12-02 13:17:49 -07:00
TreeHugger Robot
e9bf7c8436 Merge "Introduce PathInterpolator to native animators" 2016-12-01 20:21:13 +00:00
Amith Yamasani
f81df2d5e5 Merge "Secure MATCH_UNINSTALLED_PACKAGES across users" 2016-12-01 17:01:07 +00:00
TreeHugger Robot
0199070c3c Merge "Adding FUSE loop thread in app side." 2016-12-01 05:45:33 +00:00
Daichi Hirono
878e86f38f Adding FUSE loop thread in app side.
The CL adds FuseAppLoop internal class to the framework. It parses FUSE commands
from the proxy in the system service and invokes a callback provided by
application.

Bug: 29970149
Test: None, will be tested with CTS for StorageManager#openProxyFileDescriptor.
Change-Id: I10b2add4c2743fb91eae3cb194f55843a74fb668
2016-12-01 13:16:14 +09:00
Doris Liu
9e9eeeeb78 Introduce PathInterpolator to native animators
For interpolators defined with a path, PathInterpolator is more accurate
and likely less costly for longer animations than what are currently
using as a substiute - LUTInterpolator.

Test: manual test and added a unit test
BUG: 32830741
Change-Id: I867c7a28e4261392cce9c45a2992ab4fd120c496
2016-11-30 16:03:23 -08:00
Amith Yamasani
0d1fd8d091 Secure MATCH_UNINSTALLED_PACKAGES across users
Introduce a new internal flag MATCH_ANY_USER for genuine uses
of searching through all apps on the device.

Some temporary accommodations for Launchers that reach across
to the work profile until we have a new LauncherApps API to do
that officially.

Bug: 31000380
Test: CTS tests added
Change-Id: I2e43dc49d6c2e11814a8f8d1eb07ef557f31af34
2016-11-30 13:24:53 -08:00
Fyodor Kupolov
d072d14154 Support disabled/log/enforce in ro.control_privapp_permissions
Possible values:
 - disable - the feature is completely disabled - signature|privileged
   permissions are granted automatically without logging. Default behavior
 - log - log grants of signature|privileged permissions to privileged apps
   that were not whitelisted in /etc/permissions/privapp-permissions.xml.
 - enforce - enforce that only whitelisted permissions are granted.
   Only devices with ro.control_privapp_permission=enforce will pass CTS tests.

Test: Manual - device boots, permissions are granted
Bug:31008485
Change-Id: I24e0c75d2efc326c9fbec35efc92489313667212
2016-11-29 17:20:00 -08:00
TreeHugger Robot
d25cf04e98 Merge "Add explicit method to dismiss Keyguard" 2016-11-29 14:30:46 +00:00