8875 Commits

Author SHA1 Message Date
Seigo Nonaka
ac1f0a1a91 Merge "Hide the software input based on its state." into mnc-dev 2015-06-02 07:55:49 +00:00
Ruben Brunk
11df5b66ef Merge "Track camera and flashlight usage in battery stats." into mnc-dev 2015-06-02 01:48:27 +00:00
Seigo Nonaka
d9eb911bb9 Hide the software input based on its state.
This is a 2nd trial of I20ae2749a which is reverted due to a regression.
The goals of this CL are two:
- Split setImeWindowStatus method into two: keeping IMS status and
  updating system UI e.g. NavBar icon state.
- Hide software keyboard based on a realistic IMS status.

IMMS#mImeWindowVis has been used for two purpose, keeping IMS status and
updating the NavBar icons, e.g. keyboard icon.
However, to update NavBar icon, sometimes IMMS#mImeWindowVis value is
updated without any notification from IMS. As the result, the status
value becomes incosistent with the real IMS state.
This patch extracts NavBar update logic into separate method and keeps
IMMS#mImeWindowVis as notified status. Then, use it for hiding software
input correctly in IMMS#hideCurrentInputLocked.

This CL also removes refreshImeWindowVisibilityLocked method including
workaround for fixing Bug 11186297. That issue is no longer
reproducible with latest lock screen and almost no effect for existing
users and developers.  So simply remove them in this CL.

BUG: 21446788
BUG: 20764441
BUG: 18722991
Change-Id: I33dc6278fd892f26e56352722bf9449b8b102030
2015-06-02 10:32:48 +09:00
Ruben Brunk
6d2c363fd5 Track camera and flashlight usage in battery stats.
Bug: 15986092

Change-Id: Idf03981271721c44fd43327d5d90cf6f3fecfacb
2015-06-01 16:54:23 -07:00
Chris Tate
88fb145324 Merge "DO NOT MERGE Fix bug regarding the comparator sorts Alarms into increasing time order." into mnc-dev 2015-06-01 20:11:57 +00:00
John Spurlock
b0db15c6d9 Merge "Next alarm clock updates." into mnc-dev 2015-06-01 20:07:40 +00:00
Jorim Jaggi
1e47a8e096 Merge "Cleanup Keyguard handling when turning off screen" into mnc-dev 2015-06-01 19:13:11 +00:00
Wale Ogunwale
4021117d0a Merge "Allow app to stop lockTaskMode if started by manifest attribute" into mnc-dev 2015-06-01 19:06:45 +00:00
Wale Ogunwale
2c8c30ac3c Allow app to stop lockTaskMode if started by manifest attribute
It is possible lockTaskMode was started by the system process
because android:lockTaskMode is set to a locking value in the
application's manifest instead of the app calling
startLockTaskMode. In this case TaskRecord.mLockTaskUid will
be 0, so we compare the callingUid to the
TaskRecord.effectiveUid instead so the app can exit lockTaskMode.

Bug: 21464182
Change-Id: Ibca6de8e4b17051d5fcbb05cde9c8aefed7216f2
2015-06-01 11:37:57 -07:00
John Spurlock
604a5eeed7 Next alarm clock updates.
- Add explicit user setup signal to status bar icon policy.
 - Include per-user next alarm clock info in service dump.

Bug: 21551365
Change-Id: Ib16636522bbe04d205a377567007145f146e9d39
2015-06-01 12:32:46 -04:00
Stuart Scott
e3e314df4d Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I7c61a011d11e89513757f112abf320bb2a785edb
(cherry picked from commit 94b038bbb291431a7b39611d72f206b07e839891)
2015-06-01 16:31:00 +00:00
Mady Mellor
3aa33b3da0 Merge "Update button to BUTTON_STYLUS_PRIMARY" into mnc-dev 2015-06-01 16:17:37 +00:00
Filip Gruszczynski
99bcc3eee2 Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev 2015-06-01 15:42:42 +00:00
Jorim Jaggi
d175b6cfe0 Cleanup Keyguard handling when turning off screen
Before, Keyguard was shown whenever PhoneWindowManager went to sleep.
However, this was too early on some devices, and too late on others.
Now, the callbacks are split up into two phases: startedGoingToSleep
and finishedGoingToSleep. In the first callback, we decide what to
do and play the lock sound if necessary. In the second callback, we
actually show the Keyguard, or reset its state necessary, so it
doesn't interfere with the screen off animation.

Bug: 17929748
Bug: 20782303
Change-Id: I4c4406595b07b7589d64f380cd3fa96bed3d20ee
2015-05-30 00:41:07 +00:00
Jeff Brown
cb81d18367 Merge "Tell PhoneWindowManager when we start/finish interactive changes." into mnc-dev 2015-05-30 00:33:07 +00:00
Jeff Brown
416c49c404 Tell PhoneWindowManager when we start/finish interactive changes.
Added some new callbacks that can be used to more precisely trigger
certain behaviors that need to happen around the time the device
is put to sleep and locked.

Fixed an issue where the going to sleep signal might be sent too
early on devices that don't support ambient mode due to the extra
wakefulness change between DOZING and ASLEEP.  We are now track
the early / late interactive change work separately from the rest.

Bug: 21375811
Change-Id: I95387195e216ae92a6e45485bd1bd362e41aa45a
2015-05-29 17:28:40 -07:00
Adrian Roos
b85e1ecfdf Fix broken transition to secure apps when relaunching
Previously, the logic for keeping occluded mode during transitions
would also trigger when transitioning from the lockscreen to a
SHOW_WHEN_LOCKED activity that was already on-screen, which would
then prematurely clear the occluded mode and break the launch
transition.

With the fix, the lockscreen must already be occluded before the
keep-occluded-during-transitions logic is triggered.

Bug: 21525170
Change-Id: I1d9ad95b2dd0728af7986f09adb67a617cc62cb2
2015-05-29 22:32:29 +00:00
Chris Wren
0886dcc768 Merge "add time-in-mode metrics for zen mode" into mnc-dev 2015-05-29 21:33:58 +00:00
destradaa
ce48c1c1d8 Allow INADDR_NONE as a valid configuration in AGpsStatus_v3.
b/21516868

This change makes AGpsStatus_v3 consistent and compatible with the behavior
of AGpsStatus_v2.

Change-Id: Ia4e729d8ed1d61b51ae22c7eaf9bbe33f31b7a45
2015-05-29 13:49:20 -07:00
Svetoslav
815be147a3 Merge "Use AtomicFile APIs correctly when reading." into mnc-dev 2015-05-29 20:05:43 +00:00
Svetoslav
3dcdd37b66 Use AtomicFile APIs correctly when reading.
21280155

Change-Id: I354ebac8fc91d8f28eec6016474a9521ff2a490d
2015-05-29 13:01:37 -07:00
Chris Wren
98d235bcba add time-in-mode metrics for zen mode
Emit log whenever the mode changes, or periodically to catch devices that stay
in one mode for long stretches of time.

Bug: 20264417
Change-Id: I4efde180eef23c2afc34c6c2e78ef4d0b6c5b675
2015-05-29 12:31:49 -04:00
Narayan Kamath
d644c56381 Merge "Avoid inspecting packages twice to deduce ABIs for moves / installs." into mnc-dev 2015-05-29 14:04:42 +00:00
Narayan Kamath
623b58b2cf Avoid inspecting packages twice to deduce ABIs for moves / installs.
In the case of moves, we can use the existing ABIs from settings because
a move will not result in an ABI change. For new installs, we can just
use the ABI we deduced for compiling (dex2oat) the package.

bug: 21144503
Change-Id: I35e2e8abd47f547b6252271fc6b41d30719c4298
2015-05-29 14:48:07 +01:00
John Spurlock
6a2999073c Merge "Zen: Use account name instead of calendar id in event conditions." into mnc-dev 2015-05-29 13:22:33 +00:00
Guang Zhu
9bb765448d fix NPE in shutdown thread
null reboot reason is used when it's a simple reboot.

Change-Id: I9d3110ca733a1b0401721fde907924c101997c4f
2015-05-28 20:50:03 -07:00
John Spurlock
995a749f27 Zen: Use account name instead of calendar id in event conditions.
- Migrate the existing calendar attribute in the event condition
   from a long calendar id to the calendar account name.  More
   portable across a backup/restore.
 - Also skip restoring transient state (like the current condition
   state) from restored automatic rules.

Bug: 17755700
Change-Id: I9bdb421d2209e3ce90873008665c254d67c788d2
2015-05-28 22:13:03 -04:00
jinho.park
1acd32a60b DO NOT MERGE Fix bug regarding the comparator sorts Alarms into increasing time order.
The comparator used variable "when" in IncreasingTimeOrder class.
variable "when" means "elapsed time" or "real time"(RTC) and these types have different unit of time.
so, I recommend that you use a "whenElapsed" which has the equal unit of time as its default value.

Signed-off-by: Jinho Park <jinho.park@lge.com>

Cherry-pick from master

Change-Id: Ib95531bf235e8fc628a7eda1c24d187c12a9ab3b
2015-05-28 18:38:32 -07:00
Makoto Onuki
0d889cdeb7 Merge "CountryDetector no longer requires location permissions." into mnc-dev 2015-05-28 23:54:09 +00:00
Wale Ogunwale
c7cbdd11c3 Merge "Don't kill process with active service/receiver when task is removed." into mnc-dev 2015-05-28 22:38:03 +00:00
Tao Bao
165102f350 Merge "Wait for uncrypt to finish before rebooting" into mnc-dev 2015-05-28 21:48:29 +00:00
Dianne Hackborn
4573dddcce Merge "Add new API to set URI on AssistContent." into mnc-dev 2015-05-28 21:35:41 +00:00
Olawale Ogunwale
aa47d8d976 Merge "Revert "Revert "Remove debugging and skip InputMethod windows""" into mnc-dev 2015-05-28 20:59:10 +00:00
John Spurlock
517f3ee41a Merge "Backup/restore notification policy." into mnc-dev 2015-05-28 20:34:18 +00:00
John Spurlock
35ef0a626c Backup/restore notification policy.
- Include zen + ranking config in the backup payload.
 - Owner user only for now.
 - For the most part, reuse existing policy file structure
   as the payload format, but elide items that do not survive
   across devices (info for secondary users, uids).
 - Also elide the manual zen rule, if set.
 - During restore, keep ranking info for uninstalled apps
   in purgatory until the apps exist.

Bug: 17755700
Change-Id: Iadf71a43cd0efd44fe9a0a29874d60666b6d2076
2015-05-28 16:25:32 -04:00
Dianne Hackborn
09d57fe9b3 Add new API to set URI on AssistContent.
Also rework how we transfer AssistContent and AssistStructure
to the assistant, so they are delivered as completely separate
objects rather than the kludgy bundling them in the assist
data thing.

Change-Id: Ib40cc3b152bafeb358fd3adec564a7dda3a0dd1d
2015-05-28 11:44:58 -07:00
Olawale Ogunwale
c145b53719 Revert "Revert "Remove debugging and skip InputMethod windows""
This reverts commit ea343e5f673e540f5d2504fe8ac17606f0bd5d94.
Reducing log spam from WM.

Change-Id: I56468a61b15d08eff1d89b0d648f29a0e868408c
2015-05-28 17:11:29 +00:00
John Spurlock
008232acbd Merge "Zen: Store notification zen policy per-user." into mnc-dev 2015-05-28 13:53:43 +00:00
John Spurlock
21258a3703 Zen: Store notification zen policy per-user.
- Keep a zen config per user in NoMan.
 - Add zen config for all users to xml policy storage mechanism.
 - Initialize config to default for new secondary users.
 - Re-evaluate global zen on user switch.
 - Remove some unused code in NoMan.
 - Make ZenModeHelper aware of multiple users, keep all configs,
   add to dump.
 - Log config diffs in addition to the config itself in ZenLog.

Bug: 15845915
Change-Id: Ic847451e5d111c74916def1ea0948db5a76966c9
2015-05-28 09:23:58 -04:00
Martijn Coenen
f3f53d9e8d Merge "Trace process launch from ActivityManager." into mnc-dev 2015-05-28 07:40:13 +00:00
Yohei Yukawa
44aef99a00 Merge "Invalidate IMMS#mCurrentSubtype when upgrading the current IME." into mnc-dev 2015-05-28 00:57:52 +00:00
Adam Lesinski
185d2d61b5 Merge "Disable GPS when in device-idle mode." into mnc-dev 2015-05-27 23:20:51 +00:00
Jorim Jaggi
7c9d94404f Merge "Fix status bar window IME flags & layout" into mnc-dev 2015-05-27 22:57:27 +00:00
Filip Gruszczynski
2217f61e51 Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""
This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
2015-05-27 15:36:10 -07:00
Chris Wren
bcec2b0ceb Merge "add event timers to all notification logs." into mnc-dev 2015-05-27 21:05:16 +00:00
Adam Lesinski
87c17dff9f Disable GPS when in device-idle mode.
Bug:21270655
Change-Id: I3cbe95b355af61eedf66bdc0ea7b9dc1bd87e31a
2015-05-27 13:24:13 -07:00
Chris Wren
e6ddb8a134 add event timers to all notification logs.
previously, some logs had only some times, and not others.

Bug: 21394955
Change-Id: I0d7af163be23f5a989c35aba6e6f6879672543fc
2015-05-27 15:21:00 -04:00
Andres Morales
5ccfe51d8b Merge "[LockSettings] migrate password attempt throttling to hardware" into mnc-dev 2015-05-27 18:37:32 +00:00
Jorim Jaggi
aa8061448e Fix status bar window IME flags & layout
When bouncer was showing, but keyguard was occluded, staus bar
window couldn't receive input, and thus the IME window was placed
below the status bar window. In addition to that, fix the layout when
IME is showing up on the bouncer screen.

Bug: 19969474
Change-Id: I38d21647801b57608d49c3f525d4840e6ba58296
2015-05-27 11:35:46 -07:00
Julia Reynolds
843f648c82 Fallback to priority activity if preferred activity not available.
Bug: 21434199
Change-Id: I1f268700219dea7f9ed02bda320923f49a5a3457
2015-05-27 09:02:18 -04:00