26713 Commits

Author SHA1 Message Date
Tao Bao
983d449a84 Fix the NPE when checking mRebootReason
Bug: 21584198
Change-Id: Ie11092dbc771b54bd049d258dc705835a3eda494
2015-06-02 12:12:53 -07:00
Ruben Brunk
a90c453d17 Merge "Make CameraService proxy retry behavior more lenient." into mnc-dev 2015-06-02 18:55:31 +00:00
Wale Ogunwale
16dbf0c79c Merge "Enabled WMS.DEBUG_STARTING_WINDOW" into mnc-dev 2015-06-02 18:55:10 +00:00
Wale Ogunwale
9573ae1dee Enabled WMS.DEBUG_STARTING_WINDOW
To debug starting window issue reported in comment #38
of b/21384482

Bug 21384482

Change-Id: I2fbafda5fa79448057cf27a65d1be9b96894770e
2015-06-02 11:32:52 -07:00
Olawale Ogunwale
5b9b66c73c Merge "Should reset mDismissKeyguard on keyguard secure change" into mnc-dev 2015-06-02 17:51:22 +00:00
Olawale Ogunwale
cdc7bf10dd Merge "Fix null pointer dereference when security exception occurs" into mnc-dev 2015-06-02 17:51:03 +00:00
Olawale Ogunwale
cbf400b164 Merge "WindowManagerService not propagating X and Y steps" into mnc-dev 2015-06-02 17:50:38 +00:00
Ruben Brunk
28388e8ab3 Make CameraService proxy retry behavior more lenient.
Bug: 21527760
Change-Id: I70abea66f1d1fafffcfdd8e30b0cff244f814e59
2015-06-02 10:35:53 -07:00
Carlos Valdivia
2ed6369c5d Merge "System Health: Support expiring tokens" into mnc-dev 2015-06-02 17:31:29 +00:00
Dmitriy Ivanov
bb0e5391b8 Merge "Print exception stacktrace on failed scanPackageLI" into mnc-dev 2015-06-02 17:31:03 +00:00
Carlos Valdivia
91979be880 System Health: Support expiring tokens
In the past android:customTokens=true authenticators were required to handle
their own token caching. This is detrimental for battery when high traffic
authenticators are constantly spinning up processes to start services to do
file io to check their own caches.  This change allows authenticator
implementers to optionally let the framework do some of the work for them by
providing the framework with a expiration time.

The AccountManagerService will make a best effort to re-use the cached
token if possible.

Bug: 21530782

Change-Id: I16a7edba36a220e3891e55cf61c725c2be863323
2015-06-02 09:58:18 -07:00
Seigo Nonaka
ac1f0a1a91 Merge "Hide the software input based on its state." into mnc-dev 2015-06-02 07:55:49 +00:00
Lorenzo Colitti
8f602cdd38 Merge "Fix DHCP lease time parsing." into mnc-dev 2015-06-02 07:47:48 +00:00
Erik Kline
d59aa84fda pass a defensive copy of DhcpResults
Also: correct state transition handling in DhcpBoundState#enter().

Bug: 20451261
Change-Id: I3be50f6b1b3fae179d6fff7ca8ae1d687caa3221
2015-06-02 16:22:57 +09:00
Lorenzo Colitti
d973537ee1 Fix DHCP lease time parsing.
Currently we treat a lease time larger than 2**31-1 as a negative
value, which causes DhcpClient to attempt to renew its IP address
constantly. Fix this by properly handling large and infinite
lifetimes, and while we're at it, impose a minimum lease time of
60 seconds.

Bug: 21352084
Change-Id: If62c9efeffad6222e2fe0c110f77d0e4c70de96d
2015-06-02 16:21:17 +09: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
Dmitriy Ivanov
95b7d50ce1 Print exception stacktrace on failed scanPackageLI
The current message does not provide enough
 information to figure out what is going on.

Bug: http://b/8076853
Change-Id: I741781ce6829eac44e4edddd0a545f3be743ceeb
2015-06-01 18:23:29 -07: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
Dianne Hackborn
9ed0c4109d Merge "Update VoiceInteractionService from API review." into mnc-dev 2015-06-01 22:28:45 +00: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
Dianne Hackborn
2ee5c368f8 Update VoiceInteractionService from API review.
This may even manage to retain compatibility with existing
binaries!  (For now.)

Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
2015-06-01 11:42:04 -07: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
tingna_sung
e785ffa059 Should reset mDismissKeyguard on keyguard secure change
If user sets a non-secure lock screen, launch an activity which
appends window flag FLAG_DISMISS_KEYGUARD, then insert a PIN lock
SIM card, activity window will become black screen.

This is because mDismissKeyguard keeps on DISMISS_KEYGUARD_CONTINUE
when keyguard secure changes from non-secure to secure like in the
insert PIN lock SIM card case. If mDismissKeyguard is
DISMISS_KEYGUARD_CONTINUE and keyguard is secure, there is no chance
to launch keyguard unlock window anymore.

This patch handles the use case that to reset mDismissKeyguard to a
new cycle from DISMISS_KEYGUARD_START to DISMISS_KEYGUARD_CONTINUE
again once keyguard secure state change suddenly to let keyguard
window has chance to be launched.

https://code.google.com/p/android/issues/detail?id=78806

Change-Id: I0d4fd0b9bdf7d0a39f35427bfd4e1b928d9bca6b
Signed-off-by: tingna_sung <tingna_sung@htc.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
2015-06-01 07:56:55 -07:00
Christopher Desjardins
5862c5f85e Fix null pointer dereference when security exception occurs
Just above the SecurityException is a check for r.record == null,
thus dereferencing r.record will cause a null pointer exception.

Found in Android 4.3 with the following steps:

1) Start the music app.
2) Switch to the restricted user.
3) Navigate to Settings->Apps->Running->Music.
4) Tap the stop button.

The security exception should be thrown which results in
a nice message to the user, but instead a null pointer
exception is thrown which results in the settings app
crashing.

Change-Id: I4a306c38650c9d366896e592767dde70adb71c57
2015-06-01 07:45:11 -07:00
Richard MacGregor
0242b153af WindowManagerService not propagating X and Y steps
WindowManagerService received X and Y offset steps but failed to pass
them off to the relavent wallpaperservice.

Live wallpapers expect a valid value for xOffsetStep and yOffsetStep
when the WallpaperService.Engine::onOffsetsChanged function is called
As specified here:
https://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html
onOffsetsChanged(float,float, float, float, int, int)

See bug report:
https://code.google.com/p/android/issues/detail?id=173607

Change-Id: I532dedf2db055e27d6eca813e30346e37f52dc65
(cherry picked from commit e03ea68d0a7f7d7c60663feae587225cca3a3a5b)
2015-06-01 07:42:29 -07:00
Christopher Tate
3d7e0d8e21 Adjust key/value backup scheduling
We now try to perform key/value backups only while charging, proceeding
off-charger only after we've waited a full day for the device to be
plugged in.

Bug 21076663

Change-Id: Ib32c9f8bfaf8a310f5f388907e38a28d3c54bd8e
2015-05-30 00:49:26 +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