10239 Commits

Author SHA1 Message Date
Matthew Williams
b91987634b DO NOT MERGE Change scheduling logic to run network jobs sooner
BUG: 24385082
BUG: 23144425
BUG: 18117279

Run jobs with connectivity constraints as soon as the developer-allotted
delay has expired, rather than waiting for the override deadline. This
is more in tune with what developers expect, although it reduces the
amount of batching the scheduler can theoretically do.
This will also have the side effect of fixing several failing cts
tests that started breaking b/c the signal to 'run connectivity
jobs early' was removed in M and nothing was put in to replace it.

Change-Id: I7e63c2b62f2882ee906f748445bbf10c32e19c5f
(cherry picked from commit aa9843198dec910a581bdc509d3937a9ea6ceca9)
2015-10-15 23:33:06 +00:00
Dianne Hackborn
56f4197148 Merge "Fix issue #24571425: Device does not come out of idle mode for maintenance" into mnc-dr-dev 2015-10-15 23:11:12 +00:00
Dianne Hackborn
f383129b09 Fix issue #24571425: Device does not come out of idle mode for maintenance
Don't allow alarms to push the idle maintenance alarm later
than it was set for.

Change-Id: I947718ffc9d2b984a793d7e4f2d027d8ddeee41b
2015-10-15 14:51:06 -07:00
Robert Carr
38451b8247 WindowStateAnimation: Clear transformation clip rect.
Ensure the clip rect taken from transformations is cleared
when there is no transformation. Normally the failure to
clear the clip would not cause a problem, as the final clip
would be equal to the window size. However, in the event that
the window scale goes on to change (WindowState::m(H/V)Scale that is)
the clip will now be specified at the inappropriate scale (notice the
way the clip must be divided by H/VScale as SurfaceFlinger will apply
the surface transform to the clip).

Bug:24298694
Change-Id: I4548e8ecea8d66d4942e99823653a7b05f87cea0
(cherry picked from commit 2f0fe62c5426533ccdf9ec7ef28027c367286979)
2015-10-15 00:53:35 +00:00
Erik Kline
b7e722b88f Merge "Don't crash if an invalid always-on VPN profile is configured." into mnc-dr-dev 2015-10-14 17:37:57 +00:00
Matthew Williams
40ec3a9246 Merge "Correctly reschedule failed periodic" into mnc-dr-dev 2015-10-14 03:00:16 +00:00
Michael Lentine
50e796326a Merge "Remove ColorFade resouces when screen off." into mnc-dr-dev 2015-10-13 22:51:12 +00:00
Michael Lentine
d73854dbfd Remove ColorFade resouces when screen off.
This will not destroy the surface but will free up everything else used by
ColorFade when the screen is turned off. When it is turned on the surface is
dismissed.

Bug: 24371570

Change-Id: Iba455cdf225a68b320896f8b35d1e873e694b1e3
2015-10-13 14:35:18 -07:00
Jeff Hao
71d3260ffa Shorten first boot time by filtering dexopted apps by LRU.
No longer dexopt all system apps and boot listener user apps.

Bug: 23628238
Bug: https://code.google.com/p/android/issues/detail?id=186589

(cherry-picked from commit b84cb9e9719855d56ea74c2eb7afc49034c0e66f)

Change-Id: Id1a1ca9f46777f9e62df3d4f25e98a2837fabf37
2015-10-13 17:49:15 +00:00
Lorenzo Colitti
9b23f88552 Don't crash if an invalid always-on VPN profile is configured.
This is currently being hit because Settings does not clear the
always-on VPN configuration when the corresponding VPN profile is
deleted. This will be fixed in Settings, but there's no harm in
being robust to invalid configurations here.

Bug: 23625458
Change-Id: Id185a54d5892339197cd40026df5174debd957cf
2015-10-13 15:29:14 +09:00
Yohei Yukawa
ce42e92219 Merge "Unbind IME client when unsetting the current IME." into mnc-dr-dev 2015-10-13 01:00:30 +00:00
Yohei Yukawa
739d0b0585 Unbind IME client when unsetting the current IME.
This follows up Ia70b870723acf647e0c27f24aff91b40d6f85543.

In certain scenarios, only IMMS#mCurMethodId is cleared with null
while IMMS#mCurClient is still pointing to the last application.
This is problematic when IMMS#mCurClient matches
SystemConfig#getFixedImeApps(), because it means that the current
IME is to be fixed to null.

With this CL, IMMS#unbindCurrentClientLocked() is always called
every time when IMMS#mCurMethodId is cleared to null.  Note that
clearing IMMS#mCurMethodId to null is a kind of hard-reset, where
unbinding IME client should make much sense in terms of robust
and predictable state management.

Bug: 18056075
Change-Id: I6c3186050592526fc95c5b27f18e2155acff5ebc
(cherry picked from commit e13a20faccf6f33aa43c9c1fa4c4ec2a79b86cfb)
2015-10-12 17:08:59 -07:00
Svetoslav
ff7b92fc02 Shared user retains permissions no longer used by any app on an app update
If an app in a shared user uses permission A and B and these are granted
to the shared user and now an app update is installed that only uses A,
the shared user still ratains the B grant. A shared user should have only
permissions declared as used by its currenlty installed apps.

bug:24736912

Change-Id: Idea6c06bdc236fd481a860cddb379e6ce660ee87
2015-10-12 16:04:34 -07:00
Dianne Hackborn
6cc3735a49 Merge "Fix issue #23581553: Ignore Battery Optimization not work for re-install app" into mnc-dr-dev 2015-10-12 19:11:46 +00:00
Dianne Hackborn
1b79ad74ef Fix issue #23581553: Ignore Battery Optimization not work for re-install app
Remove from whitelist as appropriate.  Also be sure we can find whitelisted
apps even if they are not installed in the primary user.

Change-Id: I3ed13dca99b3ba177af8f7bd26a75258df9b6949
2015-10-12 10:59:47 -07:00
Wale Ogunwale
5c18d05177 Use effectiveUid instead of callingUid to set lockTaskMode
The callingUid can be different from that of the app been locked
(e.g. was launched from launcher) there by leading to the app crashing
when it tries to exit lockTaskMode.

Bug: 24146132
Change-Id: I03346fabd1d7e61b29178220c72f747a0600f5ec
2015-10-12 17:40:56 +00:00
Jeff Sharkey
a03ecf7d7c Merge "Push firewall rules up to ConnectivityService." into mnc-dr-dev 2015-10-12 16:34:19 +00:00
Vinu Deokaran
6be61a98fc wm: call displayReady for all built in displays when system is ready.
When system has more than one built in display, displayReady needs
to be called for all built in displays when window manager is ready.
Otherwise, some system services, such as presentation, mediarouter,
etc, won't work on these displays.

Bug: 24103683
Change-Id: Ibf08074eff555c14a318236bd06e7b4855503140
2015-10-12 16:00:54 +00:00
Matthew Williams
d6af66e89d Correctly reschedule failed periodic
BUG: 24341715
Failed jobs are rescheduled with no override deadline to avoid
running a failed job with unsatisfied constraints.
A periodic job always has an override deadline and the periodic
rescheduling code assumes this.
Hence a periodic that failed until eventual success would be
rescheduled in a bad state.

Change-Id: Id110b3522df2003506a9efdde4e719e1b9932106
(cherry picked from commit 1bde39ad1424008917e1191565f81e0b4617f2fa)
2015-10-07 23:03:41 +00:00
Eric Laurent
2a6f1d4af3 Merge "ZenModeHelper: fix cross deadlock with AudioService" into mnc-dr-dev 2015-10-07 13:39:51 +00:00
Jean-Michel Trivi
0155856a1d Fix AudioService rotation helper thread
Fix a race condition where the wait index can be incremented inbetween
  the while() loop and the lock
Fix when updateOrientation() is called: after the sleep, otherwise
  the last sleep is useless.

Bug 24677424

Change-Id: I03770a0fc8af57f4696ebee7e9c9110e17c55a24
2015-10-05 15:26:21 -07:00
Eric Laurent
e0ced4da19 ZenModeHelper: fix cross deadlock with AudioService
Processing ZenModeHelper.setConfig() synchronously in
ZenModeConditions.onConditionChanged() can cause a cross deadlock between
ConditionProviders.mMutex and AudioService.mSettingsLock.

Add a method to set Zen mode config asynchronously.

Bug: 24528290.
Change-Id: I9c1701ca6bef084527821175d84002b612241995
2015-10-05 10:43:52 -07:00
Tim Murray
791763796e Merge "Send POWER_HINT_INTERACTION on rotate." into mnc-dr-dev 2015-10-02 20:43:30 +00:00
Jorim Jaggi
8c66fa9436 Merge "Add minimum time for double tap gesture" into mnc-dr-dev 2015-10-02 19:55:26 +00:00
Jean-Michel Trivi
24806db8f6 AudioService: alternative way of handling device rotation
For devices that monitor orientation (primarily for channel assignment
 to stereo speakers):
The com.android.server.policy.WindowOrientationListener API is more
 power efficient than simply monitoring the device's orientation. When
 supported, use it instead of android.view.OrientationEventListener.
When WindowOrientationListener reports an orientation change, start
 a thread to poll the UI orientation, as its change may lag behind
 the observed rotation. Gradually increasing delays between polls
 are stored in a table.

Bug 24415763

Change-Id: I69bf68da6107af24cd02a48961dd17ceab557816
2015-10-01 18:40:26 -07:00
Tim Murray
1f407647d1 Send POWER_HINT_INTERACTION on rotate.
Send a POWER_HINT_INTERACTION to improve redraw performance when the
phone is rotated.

bug 24583227

Change-Id: I1978f0dfb9a25c00ad4da5b44d10410ad7412001
2015-10-01 17:07:12 -07:00
Jorim Jaggi
d3f84d4a9a Add minimum time for double tap gesture
Bug: 24304031
Change-Id: I15629d6b05175aea9b0d02571f6245966094f162
2015-10-01 14:13:04 -07:00
Jorim Jaggi
ea9675e7aa Merge "Do not issue config change command when not needed" into mnc-dr-dev 2015-09-25 06:54:42 +00:00
Pankaj Kanwar
65bfe1cac3 Merge "AudioService: cleanup sco audio mode upon disconnection." into mnc-dr-dev 2015-09-25 04:40:23 +00:00
Eric Laurent
48221250ba AudioService: cleanup sco audio mode upon disconnection.
Clean up SCO forced usage and A2DP suspend state upon
SCO device or profile disconnection.
This is in case the Bluetooth Headset service does not
do it.

Bug: 24316765.
Change-Id: Ifc0305607c186be49b2eb42b7868647292e56137
2015-09-24 18:41:48 -07:00
Jorim Jaggi
3b3cbb5325 Do not issue config change command when not needed
This caused a but where WindowManager was blocked on this to perform a
layout, leading to delays in screen wake-ups.

Bug: 24383169
Change-Id: I42bc08dae9057060f09c301328bb4839a970c597
2015-09-25 01:30:56 +00:00
Jorim Jaggi
ad26dc5f15 Merge "Deliver camera launch source for analytics" into mnc-dr-dev 2015-09-25 01:27:05 +00:00
Michael Lentine
cb13da9772 Merge "Revert "Dismiss color fade when it is no longer used."" into mnc-dr-dev 2015-09-25 00:31:24 +00:00
Michael Lentine
68eafe7f88 Revert "Dismiss color fade when it is no longer used."
Bug: 24371570
This reverts commit 193560002fbc080f0006df088f8f5e9c165bfd78.
2015-09-25 00:18:19 +00:00
Jorim Jaggi
40aa8811bc Deliver camera launch source for analytics
Bug: 24304031
Change-Id: I606bccf4b62b651e17c6e6d9472648deeab703da
2015-09-24 16:32:09 -07:00
Jorim Jaggi
e1de9f6745 Fix black Keyguard
When a window has both the flag fullscreen and the dismiss Keyguard
flag, we end up in a state where we hide the status bar window but
all other windows, because mShowingLockscreen nevers gets set
correctly. Move it up so we always set it no matter whether the
status bar window was visible.

Bug: 22875357
Change-Id: I7953fe7100cc99fe8fb7424a9b311b4630426657
2015-09-24 17:47:14 +00:00
Michael Lentine
17a764431a Merge "Dismiss color fade when it is no longer used." into mnc-dr-dev 2015-09-23 05:19:19 +00:00
Jorim Jaggi
1b68e8b711 Log time difference between power button presses for gesture
Bug: 24304031
Change-Id: Iab755268ee6d5c0c00836a6f68e65a74286074cf
2015-09-22 17:05:12 -07:00
Baligh Uddin
d2b597d1fd Merge "Enforce a timeout for Content Providers to be published." into mnc-dr-dev 2015-09-22 20:50:02 +00:00
Michael Lentine
193560002f Dismiss color fade when it is no longer used.
Previously the color fade layers would stay active until the screen was turned
back on. After this change, the layers are dismissed as soon as color fade
completes.

Bug: 24276564

Change-Id: I1f81b397d82d518c2bc921b22f7fe9fd066fc059
2015-09-22 13:07:05 -07:00
Andreas Gampe
b49245f962 Merge "Frameworks/base: Propagate boot status to installd" into mnc-dr-dev 2015-09-22 18:27:39 +00:00
Andreas Gampe
06bb908b78 Frameworks/base: Propagate boot status to installd
Propagate the boot status explicitly to installd so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.

Bug: 23898216
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
2015-09-21 15:16:13 -07:00
Jeff Sharkey
281a868c69 am e1a6299b: Relax locking when scanning private volumes.
* commit 'e1a6299b994bbdb304550e00d5b3b26a064bdf0c':
  Relax locking when scanning private volumes.
2015-09-21 20:29:58 +00:00
Robert Carr
64b5e1c4f9 Enforce a timeout for Content Providers to be published.
ActivityManagerService: In the case where we are launching
an application on behalf of a Content Provider request,
enforce a timeout inbetween the application attaching and
the content providers being published. Consider that a defective
content provider may block in ContentProvider::onCreate
indefinitely: in such a case the PROC_START_TIMEOUT has already
been removed as the activity manager must have called bindApplication.

In these cases, there will be nothing to wake threads blocking
on the (non timed) wait for provider to be published at the end of
ActivityManagerService::getContentProviderImpl. This can cause binder
threads to block 1 by 1 until eventually AMS runs out and becomes
unresponsive.

Bug: 22141958
Change-Id: I2226da5df5c79b37f0b896423b3c1eaa4a7ecbba
(cherry picked from commit da33c13434cb20a11b522374411a5b819503e4e0)
2015-09-21 18:03:50 +00:00
Justin Harrison
91f2123b2a Merge "Add support for setting color transforms" into mnc-dr-dev 2015-09-19 00:21:41 +00:00
Michael Wright
58e829f71d Add support for setting color transforms
Bug: 24038268
Change-Id: I05275c906e02eb9e67331f6f909166eb08ad5536
2015-09-18 23:37:28 +00:00
Adam Lesinski
680553957e Merge "BatteryStats: Better big-little CPU accounting" into mnc-dr-dev 2015-09-18 20:26:07 +00:00
Jeff Sharkey
e1a6299b99 Relax locking when scanning private volumes.
Private volumes with many large apps can take a long time to scan,
which currently happens on the main thread with several large locks
held, making it likely to trigger the system-wide watchdog.

This change relaxes this locking by scanning on the PackageManager
worker thread, and by only holding locks when required.  In
particular, we release the installer lock between each scan to give
other apps waiting to dexopt a chance to breathe.

Bug: 24172036
Change-Id: Ie28d3ff72d6be28fa2f72c57d5e4146c768df89d
2015-09-17 19:13:40 -07:00
Tim Murray
952d5b334c Merge "Send power hint on fling gestures." into mnc-dr-dev 2015-09-17 02:24:32 +00:00
Michael Wright
a4d22d718a Send power hint on fling gestures.
Use the existing PointerEventListener infrastructure to listen for
gestures that look like flings and hint to the power system when they
happen. Since we don't actually have a bound for the fling like a
regular application would, limit them to five seconds and refresh
every time a new fling is seen until the five second time period is
up.

bug 24059298

Change-Id: I5757a1e88f2ab2ef08cccefa8221d809ae71bb6f
2015-09-17 00:18:13 +00:00