Commit Graph

11718 Commits

Author SHA1 Message Date
riddle_hsu
40b300fd80 Fix race condition when collecting op callback.
Other threads may change mOpModeWatchers, mPackageModeWatchers
by startWatchingMode, stopWatchingMode.

Change-Id: Id260172979ddfc2df9331880805d16ee13e183eb
2015-11-23 13:22:03 +08:00
Nicolas Geoffray
cf49583bd0 Merge "Remove DEBUG_JIT from Zygote flags." 2015-11-18 10:47:50 +00:00
Nicolas Geoffray
245ec92b65 Remove DEBUG_JIT from Zygote flags.
The flag is being obsolete by the move to JIT.

(cherry picked from commit 9abbf45c8d)

Change-Id: I3ce4577e81f91e9dd55d44116e0f9e2014bd00b8
2015-11-18 10:07:53 +00:00
Svet Ganov
f443384d9e Handle renamed packages during default grants
If an L device has a privileged app on the system image which was
updated and an M OTA renames the app package (supported only for
privileged apps) we end up with a disabled system package setting
with no package information. Since we are not doing a null check
of the package we get from the disabled package settings during
default grants we crash leaving the system in a bad state.

bug:25687380

Change-Id: I4f2ebcaf471e4bd1696298eab4716b50c52ca5c4
2015-11-17 11:53:31 -08:00
Colin Cross
5603eca33c Merge "Vibra: Add loading of the vibrator hardware module." 2015-11-17 19:31:19 +00:00
Svetoslav
5d05bbea5f Take into account default app for default grants
Change-Id: Ib78c7dbda65d405bbf74544cad18e5e10bfcdeec
2015-11-05 16:33:05 -08:00
Svetoslav Ganov
9ae3aeec53 Merge "Revert "Take into account default app for default grants"" 2015-11-06 00:24:59 +00:00
Svetoslav Ganov
d2bbf1bf0a Revert "Take into account default app for default grants"
Apparently OEMs can set the chooser so this patch is not enough since it assumes the chooser is a platform component.

This reverts commit fce33d58d8.

Change-Id: I3b8e499d2f0a731a227d193f6c5d6ed528be2272
2015-11-06 00:24:47 +00:00
Svetoslav Ganov
82eeb2f20c Merge "Take into account default app for default grants" 2015-11-05 02:19:12 +00:00
Svetoslav
5db602fd19 Enforce weaker grant if app is default handler for miltiple action
Change-Id: Ibc46e458e277412ebb276eb5ba6f2765b6b6c5e9
2015-11-05 02:18:13 +00:00
Wale Ogunwale
d89b76a58d Merge "[ActivityManager] Fix NullPointerException in startNextMatchingActivity."
am: 7810aed854

* commit '7810aed85408bddc4cc0c65e5be8d082c638d995':
  [ActivityManager] Fix NullPointerException in startNextMatchingActivity.
2015-11-03 15:13:24 +00:00
joanne_chung
a084fb7b93 [ActivityManager] Fix NullPointerException in startNextMatchingActivity.
Symptom:
NullPointerException crash while call startNextMatchingActivity.

Root Cause:
Activity starts with FLAG_DEBUG_LOG_RESOLUTION for debug dump.
If the current Activity is the last object of resolves list,
  we can not get the next Activity and aInfo is still null.

Solution:
Check null in debug log dump.

Change-Id: I4c5d14d9acd8d47768b36c95354763841579e050
2015-11-03 11:36:41 +08:00
Svetoslav
fce33d58d8 Take into account default app for default grants
Use the correct API to query activities when granting
default permissions to ensure the preferred apps are
taken into account. This allows OEMs to customize which
app should get default permission grants if there is
more than one resolving to the query intent.

Change-Id: I047f22dfff773a2ba9de1a0144442e372607777c
2015-11-02 16:41:57 -08:00
Wale Ogunwale
6c8b91d8c2 Merge "[ActivityManager] Fix IndexOutOfBoundsException"
am: a61515720a

* commit 'a61515720ab95f6aa307c1fa4337c5c2078bad26':
  [ActivityManager] Fix IndexOutOfBoundsException
2015-10-27 15:19:56 +00:00
louis_chang
8f0555ac55 [ActivityManager] Fix IndexOutOfBoundsException
Symptom:
The stack was deleted during cleanup, so the stack
list size has reduced by one and cause this issue.

IndexOutOfBoundsException: Invalid index 1, size is 1

Change-Id: Ic6722aed98a0ad789b331d00e89cb74bf3b36d4c
2015-10-27 10:45:53 +08:00
Daniel Cashman
188e8875db Merge "libs: add libpackagelistparser"
am: cc7373eafd

* commit 'cc7373eafd0d5be7df8898748a700b47298ebf10':
  libs: add libpackagelistparser
2015-10-22 23:12:49 +00:00
Daniel Cashman
cc7373eafd Merge "libs: add libpackagelistparser" 2015-10-22 23:03:51 +00:00
Wale Ogunwale
11695e8081 Merge "Ensure state transition of paused activity."
am: c2b9c5388a

* commit 'c2b9c5388a4038ba260e2c36b7b8884cf4097c2e':
  Ensure state transition of paused activity.
2015-10-21 16:08:51 +00:00
riddle_hsu
9caeef72ee Ensure state transition of paused activity.
If there are 2 activties launched during screen off.
Both of them will be scheduled to pause immediately.
But if the first one does not complete pause in time,
and the second one is a non-fullscreen activity, the
first one will still be visible and no need to stop.

After the second one complete pause, mPausingActivity
is cleared, then the first one's complete pause is failed
and keep state at pausing. If it calls finish, it cannot
be destroyed because its state is pausing so expect it will
be paused later, but actually is has complete paused.

Sample and video:
https://code.google.com/p/android/issues/detail?id=190955

Solution:
A failed-to-pause activity should still change state to paused
if it is pausing. Then when the first activity calls finish,
it will satisfy the condition in ActivityStack.finishActivityLocked
"r.state != ActivityState.PAUSING" to continue the finish flow.

Change-Id: I2f211ddf5039b332b0c7d01ccd043aa18fe168f7
2015-10-20 16:34:05 +08:00
William Roberts
dc06bb0752 libs: add libpackagelistparser
There are 4 components that all implement package parsing, they are:
1. sdcardd
2. libselinux
3. logd
4. runas

Create a library that can be used by all of them, and new ones as needed.

Change-Id: I87a406802f95d8e7bfd8ee85f723f80e9e6b6c0c
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2015-10-14 16:38:03 -07:00
Jeffrey Vander Stoep
a2e511d6ca am 8b626548: Merge "Pass privapp specifier for selinux labeling"
* commit '8b62654855b105e5ff7628107691309a63effe0c':
  Pass privapp specifier for selinux labeling
2015-10-14 21:38:41 +00:00
Jeff Vander Stoep
0985937331 Pass privapp specifier for selinux labeling
Allow privileged apps to run in their own priv_app domain.

Motivation:
Untrusted_app is overprivileged due to the inclusion of privileged
apps like gmscore, play store and finsky. Moving these and other
privileged apps to their own domain reduces the permissions required
by untrusted_app.

A separate priv_app domain also protects priv-apps by further
isolating them from third party apps.

Bug: 22033466
Change-Id: I8e6ae5677c5a978301c453d0aa51ebed4459f5a0
2015-10-12 11:06:27 -07:00
Wale Ogunwale
83a3908047 am 1ca9f481: Merge "Fix resumeHomeStackTask can\'t resume home if activity is finishing."
* commit '1ca9f4812749a3eff0654e2ea7773e8b3704c1da':
  Fix resumeHomeStackTask can't resume home if activity is finishing.
2015-10-12 14:44:46 +00:00
Wale Ogunwale
1ca9f48127 Merge "Fix resumeHomeStackTask can't resume home if activity is finishing." 2015-10-12 14:39:16 +00:00
Mark Lu
a56ea12ca5 Fix resumeHomeStackTask can't resume home if activity is finishing.
Not to resume home activity in finishing stage as following case:

When only home task has 2 activities,
(ex: SetupWizard & DeviceOwnerProvisioningActivity),

If SetupWizard crashed during DeviceOwnerProvisioningActivity in
finishing stage,
makes DeviceOwnerProvisioningActivity cannot destroy immediately,
In resumeHomeStackTask, will resume DeviceOwnerProvisioningActivity
(returned by getHomeActivity),
But actually, DeviceOwnerProvisioningActivity cannot be resumed.
Caused ANR when back key since no more running activity can resume.

Change-Id: Icec49e092d2e7bee7f6a2d198913c1c5db7122f2
2015-10-12 06:36:24 +00:00
Filip Gruszczynski
0b45c2f87c am 21b37a5f: Merge "Make accessing mInputMethodTarget thread-safe"
* commit '21b37a5fb46f3dcd20bba0c621d8859e1c8dc32e':
  Make accessing mInputMethodTarget thread-safe
2015-10-08 23:54:13 +00:00
Filip Gruszczynski
21b37a5fb4 Merge "Make accessing mInputMethodTarget thread-safe" 2015-10-08 23:50:17 +00:00
Eric Laurent
bbf804ca0d am c6865806: am f5d3f960: am 2a6f1d4a: Merge "ZenModeHelper: fix cross deadlock with AudioService" into mnc-dr-dev
* commit 'c6865806a4f76c44bc3cc55cff87cc85f0a48061':
  ZenModeHelper: fix cross deadlock with AudioService
2015-10-07 13:56:41 +00:00
Eric Laurent
f5d3f96001 am 2a6f1d4a: Merge "ZenModeHelper: fix cross deadlock with AudioService" into mnc-dr-dev
* commit '2a6f1d4af39a72abecf16cc0a95feda7431afc07':
  ZenModeHelper: fix cross deadlock with AudioService
2015-10-07 13:46:48 +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
ec09010730 am 7f33f6e9: am 38b987ab: am 0155856a: Fix AudioService rotation helper thread
* commit '7f33f6e92fa22f47af2f8d61883197013fae4c66':
  Fix AudioService rotation helper thread
2015-10-06 00:27:18 +00:00
Jean-Michel Trivi
38b987ab79 am 0155856a: Fix AudioService rotation helper thread
* commit '0155856a1d1cb272d83b6175953dd7151fe65daa':
  Fix AudioService rotation helper thread
2015-10-06 00:14:01 +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
Nick Armstrong-Crews
dd62fb4392 am f107709f: am 13a71fbc: Merge "Fix the logging of wake time saved by Ungaze." into cw-e-dev
* commit 'f107709fb3f884f904deb1f3c09a88dd411ea30d':
  Fix the logging of wake time saved by Ungaze.
2015-10-05 18:34:57 +00:00
Nick Armstrong-Crews
13a71fbcf0 Merge "Fix the logging of wake time saved by Ungaze." into cw-e-dev 2015-10-05 18:23:12 +00:00
Nick Armstrong-Crews
024872ea70 Fix the logging of wake time saved by Ungaze.
The logging of saved time was erroneously being called more than once
per wake period. Moved the logging logic to be called from
finishWakefulnessChange(), which is only called once per wake period.

Change-Id: I268ef44edce5807644fcc8fb0dcaa1a96cae6c9e
2015-10-05 18:22:54 +00: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
e6a4f90261 am 0e28d919: am 3af80eff: am 79176379: Merge "Send POWER_HINT_INTERACTION on rotate." into mnc-dr-dev
* commit '0e28d9196deb28af89c0ea075a91ca45c989fde9':
  Send POWER_HINT_INTERACTION on rotate.
2015-10-02 20:59:09 +00:00
Tim Murray
3af80eff60 am 79176379: Merge "Send POWER_HINT_INTERACTION on rotate." into mnc-dr-dev
* commit '791763796e5f21e34c3ae81c1faad2a4c1a515dd':
  Send POWER_HINT_INTERACTION on rotate.
2015-10-02 20:48:04 +00: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
99d661ffc0 am c69f4b96: am 54afa2bd: am 8c66fa94: Merge "Add minimum time for double tap gesture" into mnc-dr-dev
* commit 'c69f4b962e1111ed44399c1243829384f83b9f2f':
  Add minimum time for double tap gesture
2015-10-02 20:15:06 +00:00
Jorim Jaggi
54afa2bdc2 am 8c66fa94: Merge "Add minimum time for double tap gesture" into mnc-dr-dev
* commit '8c66fa94361b51f39f87530f6d1f714120437cc6':
  Add minimum time for double tap gesture
2015-10-02 20:00:34 +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
182e628711 am 11568be8: am 5f48baef: am 24806db8: AudioService: alternative way of handling device rotation
* commit '11568be85e943063c43a9528da0a6b5fb2a92b3b':
  AudioService: alternative way of handling device rotation
2015-10-02 08:27:01 +00:00
Jean-Michel Trivi
5f48baef5f am 24806db8: AudioService: alternative way of handling device rotation
* commit '24806db8f6f523542510097ce0af4a32beeda83b':
  AudioService: alternative way of handling device rotation
2015-10-02 02:52:40 +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
tiger_huang
82c700f53b Make accessing mInputMethodTarget thread-safe
Use the lock to prevent other threads clearing mInputMethodTarget
while we are accessing members of mInputMethodTarget, or it will
cause system server crash due to unexpected NullPointerException.

Change-Id: Iec3bed916a019827364ddaf63a89270a4c407a47
2015-10-01 14:11:27 +08:00
Todd Kennedy
b4d41021b4 am 92b28f37: resolved conflicts for 4ed21bf0 to stage-aosp-master
* commit '92b28f37de9956c172f779df4cf540abc5b94deb':
  Allow using the JIT
2015-09-28 18:28:14 +00:00