15682 Commits

Author SHA1 Message Date
Wale Ogunwale
f3dbb57ee8 am c215b2b2: am dc9cfca8: Merge "Prevent system uid component from running in an app process" into klp-dev
* commit 'c215b2b24575e6d7693f396c7fdfe675d5ea9d1c':
  Prevent system uid component from running in an app process
2015-07-01 16:39:11 +00:00
Wale Ogunwale
78a22fd273 Prevent system uid component from running in an app process
Bug: 21669445
Change-Id: I792c6e676d4b6d54a51228d264130b8125075d98
2015-06-25 09:29:58 -07:00
Jon Larimer
7ab0ac6927 am 64d6bacf: am 2f4ad45d: Merge "DO NOT MERGE Restore calling identity before checking permission" into klp-dev
* commit '64d6bacf13e4ae913c52b773439a542dc5b2b714':
  DO NOT MERGE Restore calling identity before checking permission
2015-01-29 18:02:27 +00:00
Todd Kennedy
8719f683d2 DO NOT MERGE Restore calling identity before checking permission
Using the system service identity to check the CHANGE_CONFIGURATION
permission isn't likely to catch a security violation. Changing
back to the original caller and then checking permissions is
preferred.

Cherry picked from lmp. Fixes bug 15989465.

Change-Id: Iff08d04422bcc052a487194154f1fd0d727d38f4
2015-01-14 15:40:46 -08:00
Mark Renouf
cf0f740e39 If no display settings are matched, return the first one. DO NOT MERGE
Language changes will prevent previously saved display settings from
being loaded. This provides a fallback in the event a single entry exists
but does not match the current (localized) name of the Built-In Display.

BUG: 18130296
BUG: 18190800
Change-Id: Ibeff56045fc5713b9f79707dfb92bafc9fadd84f
2014-10-30 21:42:11 -04:00
Craig Mautner
1559d9d15f DO NOT MERGE Add empty ArrayList check.
Fixes bug 15768779.
Fixes bug 17955259.

Change-Id: I3e4c48aa0fff99025e9ba1725e3d1f3523749dbd
2014-10-15 01:30:10 +00:00
Justin Koh
267874622e DO NOT MERGE Disable vibration from notificationmanagerservice when on watch
This is a hack for this version: in a future framework version, there is an API
to do this.

Bug: 17646502
Change-Id: I7b46c0894c5a21189eb82efa04f2ce50ef1f927c
2014-09-26 22:23:33 +00:00
Kevin Ma
8174879e09 Revert "Revert "DO NOT MERGE Fix race condition between binder deaths""
This reverts commit 04c6d73fd0e4472505275688ef8497bc6697647c.

Bug: 17286687
Change-Id: Ic11d1e35198accb5a05cd419f5a522bc39fc789b
2014-09-26 18:51:16 +00:00
Justin Koh
04c6d73fd0 Revert "DO NOT MERGE Fix race condition between binder deaths"
This reverts commit 8828d86e79424fc1c7b7d1f908e3450879d5cea0.

Change-Id: I211f7b78a286868d8441323ff3c9cf4d7482fb61
2014-09-26 01:29:17 +00:00
Craig Mautner
8828d86e79 DO NOT MERGE Fix race condition between binder deaths
If a Binder dies there is a race between activity manager and window
manager to see who can handle the binderDied call first. If the
activity manager wins the race it will remove the activity and task
but leave the windows around. Until the WindowState.binderDied call
is made and all animation is complete the windows will try to access
the task that they were associated with.

This fix removes the windows of an activity when the activity is
removed. It also defers removal of the activity and task until
exiting windows have completed their animation.

Fixes bug 17031518.

Change-Id: Idf52f55c5feb0cad4e3664ef2eae5b7e95bbf490
(cherry picked from commit 5acd163b828d5b26408eb3a7904d750a1570239e)
2014-09-26 01:01:42 +00:00
Jeff Vander Stoep
9aaf54eeb6 am 71b19fc3: am 5ba31e6e: am bba79795: am 25c866a8: am e2adb1ff: Merge "Sanity-check paths of files to be restored" into jb-mr2-dev
* commit '71b19fc301ff08bd13d394dfa9ef6a3f535b149e':
  Sanity-check paths of files to be restored
2014-09-23 17:12:38 +00:00
Jeff Vander Stoep
1cf337a222 am 52824dab: am 1b4f1a79: am 1c2eaa78: am 660af7eb: am 59c1202e: Merge "Change permission guard on bindBackupAgent()" into jb-mr2-dev
* commit '52824dab7ba48713411ff3a26580b29aa2088242':
  Change permission guard on bindBackupAgent()
2014-09-23 17:11:58 +00:00
Jeff Vander Stoep
5ba31e6e9a am bba79795: am 25c866a8: am e2adb1ff: Merge "Sanity-check paths of files to be restored" into jb-mr2-dev
* commit 'bba797957a83b0ee8869cfa8a9427f6506f74fa4':
  Sanity-check paths of files to be restored
2014-09-23 16:50:29 +00:00
Jeff Vander Stoep
1b4f1a794d am 1c2eaa78: am 660af7eb: am 59c1202e: Merge "Change permission guard on bindBackupAgent()" into jb-mr2-dev
* commit '1c2eaa784b2376b674cf438f42342271c8aa79a8':
  Change permission guard on bindBackupAgent()
2014-09-23 16:50:16 +00:00
Jeff Vander Stoep
bba797957a am 25c866a8: am e2adb1ff: Merge "Sanity-check paths of files to be restored" into jb-mr2-dev
* commit '25c866a8efa148886280b34c0413a1c2c20c247f':
  Sanity-check paths of files to be restored
2014-09-23 16:34:53 +00:00
Jeff Vander Stoep
e2adb1ff4a Merge "Sanity-check paths of files to be restored" into jb-mr2-dev 2014-09-23 16:13:42 +00:00
Jeff Vander Stoep
7bc601d5d7 Sanity-check paths of files to be restored
(cherry picked from commit 7d51cc701a6735cf455af8479f56c9c0b2109e02)
Bug: 16298491
Change-Id: I0c2d6523c9d152dad4d27d06d3853afd432e5af7
2014-09-22 23:21:20 +00:00
Jeff Vander Stoep
1c2eaa784b am 660af7eb: am 59c1202e: Merge "Change permission guard on bindBackupAgent()" into jb-mr2-dev
* commit '660af7eb1a55e2df7da45aa63ca227141ef86b34':
  Change permission guard on bindBackupAgent()
2014-09-11 18:58:49 +00:00
Jeff Vander Stoep
a8f6d1bffc Change permission guard on bindBackupAgent()
Bug: 15829193
Change-Id: I6c1c39923b7b1a9f528f97da10913cb7f2d7e8f9
2014-09-10 14:20:14 -07:00
Michael Wright
da3b43633f DO NOT MERGE: Use a linear spline if there's a non-monotonic brightness curve
Some devices may contain things like transflective displays where
they actually want the backlight brightness to decrease in the face
of high ambient light scenarios. In the interest of time, just use a
linear interpolation based on the brightness control points for these
cases but in the future we should consider adding a non-monotonic
cubic spline.

Bug: 15611140
Change-Id: I308ad00943d916866ee8d2507a41b7032e6b524e
2014-09-02 14:47:37 -07:00
Jesse Hall
df7af46a4c VirtualDisplayAdapter: Set the transaction surface even if NULL
Bug: 17116728
Change-Id: I55e4a2e575cfd3788fbdb90b050dac486976c1b6
2014-08-19 09:18:40 -07:00
Prashant Malani
7450614a49 Move wakelock release to handleMessage
There were certain code paths in handleDockStateChange() that were
exiting without releasing the wakelock. So we move the release to the
calling function to prevent stray held wakelocks.

Bug: 16841895

Change-Id: I8ae4d2ab8f775c42a893d3bcdef34321c5f631a6
Signed-off-by: Prashant Malani <pmalani@google.com>
2014-08-06 22:22:18 -07:00
Craig Mautner
0fa45d93f7 Merge "Remove PendingActivityLaunches based on stack." into klp-modular-dev 2014-07-28 22:45:16 +00:00
Craig Mautner
7f13ed37fd Remove PendingActivityLaunches based on stack.
Was previously removing by trying to match activities, but the
activity being matched would not have been in the stack yet. Since
it doesn't get added to the stack when it goes into the list
of pending activities. By removing all pending activities associated
with the stack we clean up all such pending activities.

Fixes bug 16045752.

Change-Id: I6b5981ffcce674139837b06362e573299bbc9e52
2014-07-28 14:00:35 -07:00
Craig Mautner
a0bb44efe9 Merge "Finish crashed activities immediately" into klp-modular-dev 2014-07-24 20:48:02 +00:00
Craig Mautner
8e5b133bf6 Finish crashed activities immediately
By finishing crashed activities right away the VirtualDisplays
associated with ActivityView are removed immediately rather than
being deferred. Also there is no waiting for Pause (0.5 sec) and
Destroy (10 sec) timeouts to expire.

Fixes bug 15092354.

Change-Id: Ie4941cb19dcc6f6fc61b2475162ea2794c9558a2
2014-07-24 13:32:37 -07:00
Prashant Malani
a04ea61db5 Revert "Remove circular mask"
This reverts commit 2e8b27e898af3af1165a79e7c5f8b59f63f20a2f.

It also makes the circularMask option configurable via overlay.
It is set to false by default.

An offset dimension entry is also provided, for displays which have
a "chin". This is set to 0 by default.

Bug: 16380982
Change-Id: I16ec3e8d8882a6683c9155055944e5c2f5cd781e
2014-07-23 17:26:08 -07:00
Justin Koh
a63272b4b5 Merge "Revert "Wait for all windows to draw before turning screen on"" into klp-modular-dev 2014-07-17 21:09:48 +00:00
Justin Koh
528b4b7572 Revert "Wait for all windows to draw before turning screen on"
This reverts commit 0a589b929e18d05d1345d97283c3025058ddca18.

Change-Id: Ia73555cd7797b5d172f33db9f46ebc211af6fc1e
2014-07-22 00:26:23 +00:00
Prashant Malani
9353e1a2b2 Merge "Make the booting flag update unconditional" into klp-modular-dev 2014-07-17 18:11:21 +00:00
Craig Mautner
0a589b929e Wait for all windows to draw before turning screen on
Was previously only waiting for windows on the primary display to
draw which meant that windows on ActivityViews had not yet drawn.
This fix checks redraws all outstanding Surfaces before unblanking
the screen.

Fixes bug 15092354.

Change-Id: Id550db003a5f56931eb68464085596e47d25481d
2014-07-16 17:03:36 -07:00
Justin Koh
65d7c332d7 Merge "Additional cleanup after stack deletion." into klp-modular-dev 2014-07-16 22:30:55 +00:00
Craig Mautner
ee36c77acd Additional cleanup after stack deletion.
- Remove activity from PendingActivityLaunch list when it is removed
from stack. This prevents the delayed launch causing
IllegalArgumentException in b/16045752.
- Move PendingActivityLaunch from ActivityManagerService to
ActivityStackSupervisor.
- Immediately call onTaskListEmptyLocked() in cases where no
activities are found in stack.

Fixes bug 16045752.

Change-Id: Ia69a449e7f5e08ab6e36157d0fd793c4d2fdaca4
2014-07-16 15:03:11 -07:00
Prashant Malani
14bff9f55e Make the booting flag update unconditional
In case an Activity is started before we idle, there is a chance
the booting flag might never get updated.

Bug: 16015648
Change-Id: I46504bd126573e3a2ce1f914be922765ae9fe560
2014-07-16 00:00:41 +00:00
Michael Kolb
0cb38d2e5a Merge "Add configuration for activity thumbnails" into klp-modular-dev 2014-07-10 20:49:26 +00:00
Michael Kolb
5f6238e4a7 Add configuration for activity thumbnails
Bug: 15750584

Change-Id: I0b2bfb46022b46d7649f6d9ba9ba74cdfc70a6ea
2014-07-10 14:43:51 -07:00
Aaron Whyte
f5e6747440 Allow overlays to configure ConnectivityService's network sampling to not wake the device.
This can increase clockwork device battery life.
Bug:15455204

Change-Id: Ifc551e6a522627dc8e5cfdfb8f56d4e3cbeea936
2014-07-10 14:05:35 -07:00
Craig Mautner
362449af58 Do not delete stack if empty task is being reused.
If a task is being cleared due to Intent flags and that clearing
was causing the last activity in the last task on a stack to be
deleted, then we were deleting the stack. Immediately after
this we were refilling the task with the same activity but the
stack had already been deleted.

This fix preserves the task and stack when it is only being
cleared for the new activity.

Fixes bug 15611901.

Change-Id: I7bcfa826d0852d9c640daa73fe1324b89471fecd
2014-06-20 14:04:39 -07:00
Griff Hazen
2ea0d3979e DO NOT MERGE Reduce chance of notification listener dropped messages.
The existing code for notification manager/listeners uses a oneway
binder api to deliver messages. One problem with this is that
notification objects can sometimes get fairly large, and can bump
into the oneway binder transaction buffer if many happen at once.

To reduce this issue, flip the service into a oneway delivery of
a status bar notification holder, whose wrapped content is then
immediately fetched upon receipt of the one-way message. This moves
the meat of the fetch to be over a two-way interface without changing
the properties of which object is actually sent (a tickle solution
with lookup key would have changed this)

Further research: attempt to chunk notification objects themselves.
They can sometimes transfer hundreds of KB over a binder transaction.

Bug: 15426276
Change-Id: Ib1a1f4ff848c16f80bcf2ae4dfd2b87a9091f0b2
2014-06-17 20:06:45 -07:00
Craig Mautner
6335fbcba1 Revert "Revert "Close ActivityView and ActivityContainer cleanly.""
This reverts commit dd5c94717077c9366dee364c88a86a78e5ee2688.
2014-06-13 17:18:47 -07:00
Craig Mautner
6fe2184bf1 Do not treat the dummy animation as an animation
The dummy animation is a place holder. When the task stack is being
removed treating it as a true animation forced us through a path
where we deferred the detachment and made a call to tmpRemoveWindows.

Also replaced call to tmpRemoveWindows with a real remove windows
call. The tmpRemoveWindows call does not clean up the Session
and this leaves a surface on the screen.

Fixes bug 15591610.

Change-Id: I05f7bc276bfed2366bbcd8443c92a4bbbc8a4491
2014-06-13 15:46:22 -07:00
Justin Koh
dd5c947170 Revert "Close ActivityView and ActivityContainer cleanly."
This reverts commit 4a9f129874785d34930f165268dbc618e4bc2618.

Conflicts:
	services/core/java/com/android/server/am/ActivityStackSupervisor.java

Change-Id: Ic1f4df7f4cb644de7ddebcdc8ce632b46c5ba8f2
2014-06-13 09:55:09 -07:00
Craig Mautner
be63495101 Fix permission problem and NPE
Remove uid before calling into Window Manager. Restore afterwards.

Check for null stack value before dereferencing.

Fixes bug 15591112.

Change-Id: Ida3de556940440162c91b8c1614d0f21e364abd8
2014-06-12 13:50:53 -07:00
Craig Mautner
4a9f129874 Close ActivityView and ActivityContainer cleanly.
- Do not call IActivityContainer.release() from
ActivityView.finalize() if it has already been called from
ActivityView.release(). Eliminates IBinder finalized Exception.

- Call ActivityRecord.makeFinishing() before calling ActivityStack.
destroyActivityLocked(). Forces call to scheduleDestroyActivity()
and eventually removeFromHistory(). Otherwise removeFromHistory()
is never called and window manager AppWindowTokens become orphans.

- Defer call to ActivityContainer.detachLocked() until all
activities have finished or timed out. Fixes problem where Display
is removed while activities are still launching.

- Call ActivityStackSupervisor.deleteActivityContainer() when all
activities have finished or timed out. Fixes orphaned
ActivityContainers.

Fixes bug 15450798.
Fixes bug 15484154.
Fixes bug 15383479.
Fixes bug 15316558.
Fixes bug 15168560.
Fixes bug 15143914.

Change-Id: Id3c641976b6f825458690f9ee063c07818b56f23
2014-06-11 16:33:00 -07:00
Craig Mautner
e33010a261 Merge "Add NO_ANIMATION flag to ActivityView Intents." into klp-modular-dev 2014-06-11 08:41:11 +00:00
Griff Hazen
9f637d1095 Reduce notification service historical archive size to 1 for watches.
To remove the memory footprint

Bug: 15536759
Change-Id: I081bd962fef689b5d8ed126208499d56ebf4ae38
2014-06-10 15:31:48 -07:00
Craig Mautner
e6d80f4ce4 Add NO_ANIMATION flag to ActivityView Intents.
Add Intent.FLAG_ACTIVITY_NO_AMINATION to all Intents passed into
ActivityView.

Fixes bug 15393526.

Change-Id: I1899a5019416109e982f0254aaba410bb1f4a38d
2014-06-10 13:31:02 -07:00
Amit Mahajan
3f175a3587 am e5a28d34: am 20c5ce50: Handle provisioning APN by turning off/on radio.
* commit 'e5a28d34f662c469f85590dda28fc02eca12204b':
  Handle provisioning APN by turning off/on radio.
2014-06-09 19:50:09 +00:00
Amit Mahajan
20c5ce50c4 Handle provisioning APN by turning off/on radio.
The change is specific to AT&T as they want no signaling from device during provisioning.
I've tested following cases:
- expired AT&T SIM to make sure provisioning flow works as expected.
- airplane mode on/off with both active and expired AT&T SIM.
- wifi <-> mobile transitions work okay.
- LTE with Verizon SIM (basic sanity).

bug: 13190133

Change-Id: I215963174ae6000ae71d1dda693f95413f3d6e81
2014-06-09 17:55:27 +00:00
Michael Kolb
4bdc93d63e Merge "Remove circular mask" into klp-modular-dev 2014-06-06 15:26:17 +00:00