20507 Commits

Author SHA1 Message Date
Craig Mautner
333c2ec883 Remove misleading error log.
It's perfectly ok for a secondary display to not have a home stack.
There is no reason to report it.

Related to b/17677973.

Change-Id: Ia9d52cabb601760d32d2b847dfa0ca4f304e4e2a
2014-10-02 12:24:02 -07:00
Paul Jensen
c8b9a7428d Send updated NetworkAgent score to NetworkFactories when validated.
Previously the score was not sent out causing other NetworkFactories
to have the lower unvalidated score and to repeatedly try to bring
up a new Network only to have it torn down.
Also, avoid logging an error when tearing down a network with only
listening requests.

bug:17726566
Change-Id: I82ff7c9bd5ec962f62a50ad0042c278622953969
2014-10-02 11:06:43 -04:00
Paul Jensen
4b9b2be894 Allow any unvalidated Network to satisfy NetworkRequests.
Explicitly selected Networks may never be validated (e.g. Chromecast)
but are still given a high score so they can explicitly become the
default Network.  Without this fix they do not become the default
Network if another Network is present.  This was an artifact of how
unvalidated Networks were handled, but now that unvalidated Networks
are properly handled, ala 50807d, we can freely rematch even
unvalidated Networks and NetworkRequests.
Also, never linger and teardown unvalidated Networks as the user
might be in the process of signing in.  This better matches prior
behavior when unvalidated networks didn't match NetworkRequests,
and thus were never lingered.
Also, don't disconnect networks that may be lingering.  The
disconnect logic in rematchNetworkAndReqeuests() is adjusted to only
fire when a network is newly validated.
It is incorrect to consider rematching uncreated Networks and
explicitly selecting created Networks, so this change logs error
messages in those cases.

bug:17647968
bug:17396616
Change-Id: Id6b8a350b8200f484d5bfd14ca0a8f64f08846a0
2014-10-02 10:56:51 -04:00
Sreeram Ramachandran
c04e922f67 am 5aaabc0f: Merge "Send app permissions to netd." into lmp-dev
* commit '5aaabc0fa66dd755843f040fe634962477107950':
  Send app permissions to netd.
2014-10-02 06:29:37 +00:00
Sreeram Ramachandran
e4a05afe85 Send app permissions to netd.
Based largely off Robert's http://ag/546170 (thanks!)

Bug: 15413737
Change-Id: I8a1f0a184923c4c0a4935e6b88895bcc05e39f02
2014-10-01 20:22:34 -07:00
Dianne Hackborn
796d6eced1 am c338784b: Merge "More work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev
* commit 'c338784bf6bfcce3cd7db40f46b0e6c815e9ed3a':
  More work on issue #17656716: Unhandled exception in Window Manager
2014-10-02 00:27:48 +00:00
Dianne Hackborn
c338784bf6 Merge "More work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev 2014-10-02 00:23:18 +00:00
Erik Pasternak
739bf81dd1 am 4d82c46e: Merge "Implement auto-sleep functionality." into lmp-dev
* commit '4d82c46ef5df06e1b92f3574e41b38a62ec0e607':
  Implement auto-sleep functionality.
2014-10-02 00:04:01 +00:00
Erik Pasternak
4d82c46ef5 Merge "Implement auto-sleep functionality." into lmp-dev 2014-10-02 00:00:40 +00:00
Dianne Hackborn
8d05172112 More work on issue #17656716: Unhandled exception in Window Manager
Fix Slog.wtf to not acquire the activity manager lock in its code
path, so that it can never deadlock.  This was the original intention
of it, but part was missed.

Now we can put back in the code to detect when strict mode data is
getting large (a little more targeted now to the actual problem),
and use Slog.wtf to report it.  And as a bonus, when this happens
we will now clear all of the collected violations, to avoid getting
in to the bad case where IPCs start failing.  So this should be
good enough for L to fix the problem, with wtf reports for us to
see if the underlying issue is still happening.

Finally, switch a butch of stuff in the system process from Log.wtf
to Slog.wtf, since many of those are deadlocks waiting to happen.

Oh and fix a crash in the settings provider I noticed in APR.

Change-Id: I307d51b7a4db238fd1e5fe2f3f9bf1b9c6f1c041
2014-10-01 16:58:56 -07:00
Dianne Hackborn
9a4afb3f51 am c3e7f87b: Merge "Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build." into lmp-dev
* commit 'c3e7f87bf9930a20c37609f567f5d88305fb1ddd':
  Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build.
2014-10-01 23:35:49 +00:00
Svetoslav
304a35287a am d35b072d: Merge "Fix accessiblity introspection from the shell user regression." into lmp-dev
* commit 'd35b072dca42d249c219c886322c122739b086d7':
  Fix accessiblity introspection from the shell user regression.
2014-10-01 23:30:22 +00:00
Dianne Hackborn
c3e7f87bf9 Merge "Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build." into lmp-dev 2014-10-01 23:29:49 +00:00
Dianne Hackborn
bfa6190fcc am 144508d5: Merge "Revert white space changes." into lmp-dev
* commit '144508d5da4dec37183617ec259ab83d2db4f012':
  Revert white space changes.
2014-10-01 23:25:43 +00:00
Svetoslav
d35b072dca Merge "Fix accessiblity introspection from the shell user regression." into lmp-dev 2014-10-01 23:24:47 +00:00
Dianne Hackborn
144508d5da Merge "Revert white space changes." into lmp-dev 2014-10-01 23:21:11 +00:00
Winson Chung
f7d4eb52ae am 7f76e505: Merge "Fixing invalid check to get component enabled state. (Bug 17679693)" into lmp-dev
* commit '7f76e505624fddbc4ba3350f3e381ccd275a5a75':
  Fixing invalid check to get component enabled state. (Bug 17679693)
2014-10-01 22:59:26 +00:00
Winson Chung
7f76e50562 Merge "Fixing invalid check to get component enabled state. (Bug 17679693)" into lmp-dev 2014-10-01 22:53:29 +00:00
Dianne Hackborn
9449a6162e Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build.
There was a path through idle where we could clear mBooting but not set
mBooted, so we would no longer start activities.  This is probably happening
because if you start a user or userdebug build with the device plugged in
to adb, the system early on starts the USB security dialog, before home is
started.  If that goes idle first, we will end up in the case where we
clear booting (because something went idle) but not set booted (because it
was not home that went idle).

Change this so that we always set booted when clearing booting.

Change-Id: I40053710eefa939315aeb9475ecdd2e8a87351ff
2014-10-01 15:53:28 -07:00
Dianne Hackborn
01945f240a Revert white space changes.
Change-Id: I3bc9995adf5cefd91f5a9fd4d2a701056dba3ca9
2014-10-01 15:14:28 -07:00
Svetoslav
ceac51dedd Fix accessiblity introspection from the shell user regression.
Accessibility introspection APIs are meant to query only the state of
the current user. There are command line tools that run as the shell
user and want to be able to intropspect the screen. When resolving
the calling user we were using the calling user id instead of the
special constant for the current user.

Now when resolving the calling user for intrspection we are using
the current user constant and consequentially only the current
user or a profile of the current user or the root or the shell or
the system or an app with cross user permission can introspect the
screen.

bug:17674631

Change-Id: I36d1d7b65441d04c3b4204123c4b6d036ff032c0
2014-10-01 15:07:27 -07:00
Winson Chung
dcf21d1545 Fixing invalid check to get component enabled state. (Bug 17679693)
Change-Id: I225d59bf766122d667d990d7e5b1971c6e8af2aa
2014-10-01 15:04:16 -07:00
Jeff Brown
05af6adb8d Implement auto-sleep functionality.
Added a new SLEEP_TIMEOUT setting which governs how long the device will
remain awake or dreaming without user activity.  By default this
value is set to -1 which maintains today's existing behavior.

We basically represent the time we are allowed to be dreaming as a new
kind of user activity summary state called DREAM, similar to BRIGHT
and DIM.  When the sleep timeout expires, the state is cleared and
the dream ends.

Bug: 17665809
Change-Id: I59aa7648dcec215f1285464fc1134934a09230e5
2014-10-01 15:01:10 -07:00
Craig Mautner
9ab8fbbc60 am 245645ca: Merge "Don\'t clear visible-behind activity if it is top" into lmp-dev
* commit '245645ca460150b4030d84c88faa931345a90a50':
  Don't clear visible-behind activity if it is top
2014-10-01 17:52:57 +00:00
Craig Mautner
245645ca46 Merge "Don't clear visible-behind activity if it is top" into lmp-dev 2014-10-01 17:48:14 +00:00
Craig Mautner
64ccb70867 Don't clear visible-behind activity if it is top
Previously if an activity requested to keep running behind
translucent activities (Activity.requestVisibleBehind()) and then
converted itself to opaque (Activity.convertFromTranslucent()), we
would clear the visible-behind activity. This change tests to see
if the top activity is the visible-behind activity and does not
clear it in that case.

This change also clears the visible-behind activity whenever it
comes back to the front. That forces the activity to call
requestVisibleBehind() each time it is resumed.

Fixes bug 17648436.

Change-Id: Id0fc4d7e2a2b907675305d98bad1b08cb610919e
2014-10-01 10:14:53 -07:00
John Spurlock
cd98a55956 am c909e1b2: Zen: Fix new event category check.
* commit 'c909e1b2dfa2e47b786d96818f70f6308c5a78be':
  Zen: Fix new event category check.
2014-10-01 16:56:02 +00:00
John Spurlock
c909e1b2df Zen: Fix new event category check.
Allow events through if configured, and use a switch
for separating mode-specific logic.

Bug:17580878
Change-Id: Id7b5d8b50173015d6a78568ed0a90e0bccf98549
2014-10-01 11:17:43 -04:00
Brian Carlstrom
ae214fac0f am 7123bd69: Merge "Use VMRuntime.isBootClassPathOnDisk" into lmp-dev
* commit '7123bd690fa14d0b9e33f5a70c58ea5b5f1b7d32':
  Use VMRuntime.isBootClassPathOnDisk
2014-10-01 15:03:39 +00:00
Jeff Brown
6907304024 am 62434d6a: Merge "Reduce latency from doze to screen on." into lmp-dev
* commit '62434d6a4b4b5aa7d44aa4344b5cb0f82df2b923':
  Reduce latency from doze to screen on.
2014-10-01 15:03:24 +00:00
Dianne Hackborn
88998f79f1 am 62321ab1: Merge "Maybe fix issue #17700474: manta: high occurrence of device booted..." into lmp-dev
* commit '62321ab11460fd852449b3f6a2113694e3e04e7a':
  Maybe fix issue #17700474: manta: high occurrence of device booted...
2014-10-01 15:03:02 +00:00
Svetoslav
6cda1b3fd2 am 6b491b64: Merge "Invalid accessibility state if UI test process crashes in a bad time." into lmp-dev
* commit '6b491b64ba7200a85199452b6a7f99c777105f22':
  Invalid accessibility state if UI test process crashes in a bad time.
2014-10-01 15:02:24 +00:00
Winson Chung
d164460e69 am 86ef70eb: Fixing build (Bug 17381033)
* commit '86ef70eb08b83fc41d0c8e124315d9ee9fea0ee4':
  Fixing build (Bug 17381033)
2014-10-01 15:02:18 +00:00
Winson Chung
53c7483dd9 am c12f5745: Merge "Fixing an issue with leaking starting windows. (Bug 17657878)" into lmp-dev
* commit 'c12f57457411e67adf2c8acaad21b08c934e583b':
  Fixing an issue with leaking starting windows. (Bug 17657878)
2014-10-01 15:02:01 +00:00
Craig Mautner
d6770a0cab am 4fb4163f: Merge "Call Surface.release() for starting windows" into lmp-dev
* commit '4fb4163f4c6f49eebc34d1b193c526558af0d375':
  Call Surface.release() for starting windows
2014-10-01 15:01:57 +00:00
Jeff Sharkey
7bd4aba1a8 am b27d43a8: Merge "Clear ident when obtaining provider across users." into lmp-dev
* commit 'b27d43a8805769f9a9dfdc024b5cd19b71cfd8d7':
  Clear ident when obtaining provider across users.
2014-10-01 15:01:05 +00:00
Svetoslav
567c97881b am 44d4eeaa: Merge "Use default encryption password if an accessibility service is enabled." into lmp-dev
* commit '44d4eeaa48721296663a05d01071f196a509dc34':
  Use default encryption password if an accessibility service is enabled.
2014-10-01 15:00:44 +00:00
Brian Carlstrom
7123bd690f Merge "Use VMRuntime.isBootClassPathOnDisk" into lmp-dev 2014-10-01 04:21:26 +00:00
Jeff Brown
62434d6a4b Merge "Reduce latency from doze to screen on." into lmp-dev 2014-10-01 02:31:30 +00:00
Dianne Hackborn
62321ab114 Merge "Maybe fix issue #17700474: manta: high occurrence of device booted..." into lmp-dev 2014-10-01 01:16:15 +00:00
Dianne Hackborn
7622a0f8e4 Maybe fix issue #17700474: manta: high occurrence of device booted...
...but dev.bootcomplete flag is not set

Rework things to address a few issues I found:

- When the activity goes idle, the way we were handling finishing the
  boot there was calling finishBooting() with the lock held, but it
  shouldn't.  We now dispatch that and turning on the screen together
  in a separate message.

- Make sure we don't try to start the home activity until we have
  reached the point of the system being ready and mBooting being set.
  This ensures we don't do any work prematurely.

Change-Id: If30c1f287af73bc2164e7aadbe98022ae42cc5e7
2014-09-30 18:05:18 -07:00
Jeff Brown
0a434776b8 Reduce latency from doze to screen on.
Don't wait for the brightness ramp to complete before reporting
display ready.  Keep track of whether we have any unfinished
brightness changes and take care to grab a wakelock to ensure
they are eventually applied.

Ideally we would rewrite the whole state machine to more carefully
coordinate screen state and brightness changes but that's too
risky for now.

The pixel fairies are having a bad day.

Bug: 17718416

(cherry picked from commit 875f80c2732a3fbe652a6e8fc14031041f791308)

Change-Id: I7a2d8ba4591a12b773653d3dbf86c7db016f967e
2014-09-30 18:00:40 -07:00
Matthew Williams
d55d3c597a am bc156ba4: Merge "Fix deadlock caused by clearAllBackoffs in SSE" into lmp-dev
* commit 'bc156ba430d286aaab8deb7bbb3bccc655cd2e92':
  Fix deadlock caused by clearAllBackoffs in SSE
2014-10-01 00:52:38 +00:00
Lorenzo Colitti
6c1d0e0784 am d8f7e048: Merge "Update LegacyTypeTracker state before sending connect broadcasts." into lmp-dev
* commit 'd8f7e048281559462f9c590f9d7d48fb7fe065ce':
  Update LegacyTypeTracker state before sending connect broadcasts.
2014-10-01 00:52:34 +00:00
Jean-Michel Trivi
0ed179d185 am 4a154af9: Merge "Send volume keys to the default stream if not actually playing" into lmp-dev
* commit '4a154af9aad13c09821ada6187440feaec2d38e8':
  Send volume keys to the default stream if not actually playing
2014-10-01 00:51:32 +00:00
Brian Carlstrom
a39871ef5e Use VMRuntime.isBootClassPathOnDisk
Bug: 17679443
Change-Id: If53c236058a7237d735c2344a715cf0a36301f9b
2014-09-30 16:49:32 -07:00
Svetoslav
6b491b64ba Merge "Invalid accessibility state if UI test process crashes in a bad time." into lmp-dev 2014-09-30 23:33:56 +00:00
Winson Chung
86ef70eb08 Fixing build (Bug 17381033)
Change-Id: I95a7c8167f82a4fe982bdc9588d5fbaf5a627d0b
2014-09-30 16:17:12 -07:00
Svetoslav
419036b560 Invalid accessibility state if UI test process crashes in a bad time.
We allow a fake accessibility service to connect to the system for UI
automation. If the process hosting the fake service dies right after
registering it, the accessibility layer ends up in a bad state and
subsequent attempts to connect UI automation service fail.

bug:17725904

Change-Id: Idad288eab41bbdd486d95e1e5803220640653fb7
2014-09-30 16:04:50 -07:00
Winson Chung
c12f574574 Merge "Fixing an issue with leaking starting windows. (Bug 17657878)" into lmp-dev 2014-09-30 22:48:43 +00:00