2931 Commits

Author SHA1 Message Date
Mathias Agopian
8514b92bc4 don't handle the transparent region of a layer in draw()
this is already taken into consideration in computeVisibleRegion
and therefore not needed at draw time.

Change-Id: I3fc7336d22f1147dfcd3a20fd71bf79b946d971f
2010-08-11 16:05:06 -07:00
Mathias Agopian
1efba9a617 get rid of our LayerVector implementation
we now use SortedVector<> with a special compare implementation.

Change-Id: I910459cf3b3c8993b55ad0786a8c348369262de5
2010-08-11 16:05:05 -07:00
Mathias Agopian
ff1d410288 keep a list of visible sorted surfaces
Change-Id: Ib815eeff894f8a3b1e79fbbf8186d5d91bb60285
2010-08-11 16:04:51 -07:00
Dianne Hackborn
bd1c082cf9 Merge "New system property "sys.boot_completed" set to 1 when boot completed." into gingerbread 2010-08-11 15:16:01 -07:00
Jeff Brown
a41ca77fab Add support for the PointerLocation overlay.
This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications.  The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).

Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
2010-08-11 14:46:32 -07:00
Dianne Hackborn
f4c454bac9 New system property "sys.boot_completed" set to 1 when boot completed.
Change-Id: Ie3fc0b1efdfb637b0c780064a71e8c1575e15ca3
2010-08-11 12:47:41 -07:00
Kenny Root
a02b8b05dd Move OBB file reading to DefaultContainerService
The system_server shouldn't touch files on the SD card. This change
moves the things that touch the SD card out to the
DefaultContainerService so that it will get killed if the SD card goes
away instead of the system_server.

Change-Id: I0aefa085be4b194768527195532ee6dddc801cfc
2010-08-11 11:20:53 -07:00
Eric Laurent
8cc93b9b21 Fix issue 2909189: System property ro.audio.silent no longer mutes system.
Fixed regression introduced by commit 2a6b80bc65c4782b5a7168b300e1dc5ec9f617ee:
master mute was not working if no effect chains were present on session 0.

Change-Id: I66d107e045d159cb94d29c7476fa1e12d92f2ae7
2010-08-11 05:20:11 -07:00
Konstantin Lopyrev
6c6d57c6a0 Merge "Fix focus notification" into gingerbread 2010-08-09 17:03:10 -07:00
Konstantin Lopyrev
5e7833a571 Fix focus notification
Change-Id: I51d73100695ceb70620754a1897ace681a26d839
2010-08-09 17:01:11 -07:00
Eric Laurent
2a6b80bc65 Fixed several audio effects problems.
- Fixed constant inversions in AudioEffect.java
- Do not return error when enabling an already enabled effect
- Update cached effect state in native AudioEffect class when effect is enabled/disabled by command() method
- Remove click when restarting effect during disable sequence
- Fixed problem in master mute management when volume control is delegated to effect.

Change-Id: I6df4ce9fcc54fdc7345df858f639d20d802d6712
2010-08-09 05:48:20 -07:00
Konstantin Lopyrev
f962476471 Adding a way for Hierarchy Viewer to get the focused window.
Change-Id: I01e6ab4aa24d632fba586cb9e112d8d9df1a681a
2010-08-06 13:27:31 -07:00
Mike Lockwood
5723dfe8c8 GPS: Don't set XTRA download pending flag at boot time.
XTRA data downloads are now strictly on demand from the GPS engine.
Also fix typo in handleDownloadXtraData()

Change-Id: Ied1a6e2e62134add4d965326aae909c86f834682
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-06 10:15:15 -04:00
Chung-yih Wang
1d62c7737c Fix the build
Change-Id: I410e2fd057b68e1b5b5b33ee10178a01d3c9b2fa
2010-08-06 11:52:38 +08:00
Chung-yih Wang
2d94231ef9 Add SIP service into system server.
Change-Id: Icc39e4e54768cfdcc1b20a3efe6206009b9a8d10
2010-08-06 08:40:50 +08:00
Daniel Sandler
9b87770f53 Merge "Fix crash when startForeground posts a broken Notification." into gingerbread 2010-08-04 20:33:32 -07:00
Kenny Root
e2f7417529 Failure to move .dex in eng builds is not fatal
When moving between program locations or application names, the .dex
file is moved by installd. However, in engineering builds, the
applications are run through dexopt on-demand. If the .dex file fails to
move, we can ignore it because it's most likely because the .dex file
does not exist yet.

Change-Id: Id5c4dbfa33f19c976acd9f184ccd637752326629
2010-08-04 13:35:33 -07:00
Kenny Root
deb112674e Only allow one movePackage operation in-flight
When a movePackage operation is requested, don't allow multiple requests
to pile up for one package. Once a move is completed, an observer will
receive the message and be allowed to call movePackage again.

Change-Id: Ie3842b6d96446febc0037bf9b8f1ca250735edc2
2010-08-04 08:44:31 -07:00
Daniel Sandler
d0a2f86f35 Fix crash when startForeground posts a broken Notification.
The NotificationManager tries to crash the calling app, but
in the case of a service calling startForeground, the caller
is the ActivityManager, so system_server goes down.

NotificationManagerService#enqueueNotificationInternal is a
new internal-only method that accepts a UID/PID to use when
punishing bogus notifications (such as the one in
http://b/2869787).

Change-Id: I84a9854bae630bc90288cebb94f174809d5dac8c
2010-08-04 10:52:51 -04:00
Brad Fitzpatrick
389a916769 Usage Stats: don't block writing stats to disk.
I was seeing lots of stack traces of people hung for noticeable
amounts of time when switching between activities.

e.g. On of the common gmail stacks showing this pause was:

android.os.StrictMode$StrictModeDiskWriteViolation: policy=391 violation=1
  at android.os.StrictMode$AndroidBlockGuardPolicy.startHandlingViolationException(StrictMode.java:272)
  at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:243)
  at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:238)
  at java.io.FileOutputStream.<init>(FileOutputStream.java:97)
  at java.io.FileOutputStream.<init>(FileOutputStream.java:69)
  at com.android.server.am.UsageStatsService.writeStatsFLOCK(UsageStatsService.java:424)
  at com.android.server.am.UsageStatsService.writeStatsToFile(UsageStatsService.java:398)
  at com.android.server.am.UsageStatsService.notePauseComponent(UsageStatsService.java:539)
  at com.android.server.am.ActivityManagerService.updateUsageStats(ActivityManagerService.java:1856)
  at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:667)
  at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2925)
  at com.android.server.am.ActivityStack.requestFinishActivityLocked(ActivityStack.java:2836)
  at com.android.server.am.ActivityManagerService.finishActivity(ActivityManagerService.java:2276)
  at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:237)
  at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1415)
  at android.os.Binder.execTransact(Binder.java:320)
  at dalvik.system.NativeStart.run(Native Method)

  at android.app.ActivityManagerProxy.finishActivity(ActivityManagerNative.java:1454)
  at android.app.Activity.finish(Activity.java:3260)
  at android.app.Activity.onBackPressed(Activity.java:1929)
  at android.app.Activity.onKeyUp(Activity.java:1907)
  at android.view.KeyEvent.dispatch(KeyEvent.java:1088)
  at android.app.Activity.dispatchKeyEvent(Activity.java:2087)
  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1661)
  at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2543)
  at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2516)
  at android.view.ViewRoot.handleMessage(ViewRoot.java:1866)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:3609)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  at dalvik.system.NativeStart.main(Native Method)

Change-Id: Id49157bc635017292eaefddc5e22d73f5f4ab05e
2010-08-03 15:41:05 -07:00
Konstantin Lopyrev
321f7fad5c Making sure that there is no notification when focus changes from something to nothing.
Change-Id: Ib8b3bdd7f5dd999c933a017fe1b34263afe38e4a
2010-08-03 11:21:55 -07:00
Christopher Tate
09e85dc027 Mute a common-case progress log about input injection
Change-Id: I37c9f5cb239ab93fde3a42f71f2782d8734c53ce
2010-08-02 11:59:11 -07:00
Kenny Root
8b61b68b64 Merge "Only install after MCS success" into gingerbread 2010-07-30 16:55:37 -07:00
Kenny Root
6f89fa07b4 Only install after MCS success
If MCS dies in the middle of a call during install, only proceed if the
call was successful. Otherwise wait for the max retries to be reached
and run the failure handling code there.

Change-Id: I00a27ea91046ea6521a3cff5e5ffe2c71b2b5bb4
2010-07-30 16:35:04 -07:00
Brad Fitzpatrick
d2165cfce7 Merge "StrictMode: time violations in Binder calls" into gingerbread 2010-07-30 15:20:28 -07:00
Brad Fitzpatrick
cb9ceb1029 StrictMode: time violations in Binder calls
Change-Id: I5796993dce98be722cf679b78acaf0c9de0ba461
2010-07-30 14:28:55 -07:00
Jean-Baptiste Queru
154a320069 resolved conflicts for merge of 27eecb70 to gingerbread
Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
2010-07-30 12:08:31 -07:00
Andreas Huber
7f9fe5fdfa Merge "Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference." into froyo 2010-07-30 08:05:56 -07:00
The Android Open Source Project
392edec116 Merge from open-source froyo
Change-Id: Ifa75fce9bd362b06ecb622219ef501e61e89fd76
2010-07-29 15:38:49 -07:00
Dianne Hackborn
3855980b43 Fix a bug where we cleaned an apps external data when upgrading it. :(
Change-Id: I0eee1e7062d334c66d6daa3c43e11a292263aada
2010-07-29 15:24:15 -07:00
Dianne Hackborn
31b5d5485f Merge "Fix a bug where we cleaned an apps external data when upgrading it. :(" into gingerbread 2010-07-29 14:07:14 -07:00
Dianne Hackborn
fb1f103191 Fix a bug where we cleaned an apps external data when upgrading it. :(
Change-Id: I0eee1e7062d334c66d6daa3c43e11a292263aada
2010-07-29 13:58:32 -07:00
Jeff Brown
6ec402b5ae DO NOT MERGE: Fix input event injection ANRs on UI thread.
Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.

Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
2010-07-29 12:54:27 -07:00
Andreas Huber
d04ed08a7c Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference.
Change-Id: Ib71113a3bc5aa5fdc088ab4ac3627352499ad3fa
2010-07-29 09:25:10 -07:00
Mike Lockwood
8dc16c27e2 Fix typo in GPS mode logic.
MS-Assisted support should not be required for using MS-Based mode.

Change-Id: Ia6ee219674de3e9cc13190b753f8776305a4fa90
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-29 11:39:55 -04:00
Eric Laurent
a54d7d3d7d Fixed underrun in audioflinger mixer.
When all audio tracks have been disabled and the mixer is running idle before the output stream is placed in standby,
the mixer sometimes fails to write to the output stream on time to avoid underrun.

This is because the sleep period used to wait before the next write to output stream is too close to the actual buffer duration.
In fact this sleep time is not critical as if we write too early to the output stream, the kernel driver will wait for free buffers
from the audio DSP DMA and we will sleep anyways.

The fix consists in dividing the calculated wait period by 2 to increase the margin.

Change-Id: I5730887dc2ccce2a511bc858494a6f7da6b392a0
2010-07-29 06:50:24 -07:00
Eric Laurent
493941b8d8 Allow creation of an audio effect on a session with no audio tracks.
This is necessary to allow creating and enabling an effect attached to a particular player
session before the playback is started. As a matter of fact, the implementation of the mediaplayer
does not create the AudioTrack before playback starts.

Change-Id: I1266e8885f9d756acc949303321aaac0fbf83e34
2010-07-29 02:34:40 -07:00
Mathias Agopian
9f2a91bc2b Merge "fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once." into gingerbread 2010-07-28 16:30:56 -07:00
Kenny Root
f369a9b5f7 Remove stale temporary ASEC containers
When a temporary container is created, its existence should be
ephemeral. However, if there is an error that causes system_server to be
killed during the process of creating a finalized ASEC, delete the stale
containers on the next start-up of system_server.

Change-Id: I7be8f94638a824295474c9a95960594848cb726b
2010-07-28 14:48:58 -07:00
Kenny Root
56c02dc3d3 Merge "Fix getTempContainerId()" into gingerbread 2010-07-28 14:48:40 -07:00
Kenny Root
c78a807974 Fix getTempContainerId()
getTempContainerId() would always return "smdl2tmp1" unless you had
MAX_CONTAINERS number of SD card SDKs, because of an array sort that put
all the zeros at the beginning.

Switch from trying to find a hole in the series of numbers to just
getting a number that's one larger than the previous. This reduces the
algorithmic complexity and the memory requirements.

Bug: 2832580
Change-Id: I32dc75ef5a6645f594ea47b032d7402e8860ebcd
2010-07-28 14:45:14 -07:00
Jeff Brown
6d0fec2de3 Refactor input reader to support new device types more easily.
Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type.  This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.

Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).

Simplified EventHub interface somewhat since InputReader is taking over
more of the work.

Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.

Fixed swiping finger from screen edge into display area.

Added logging of device information to 'dumpsys window'.

Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
2010-07-28 14:16:15 -07:00
Joe Onorato
0c39b6c65b Merge "Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference." into gingerbread 2010-07-28 09:53:12 -07:00
Eric Laurent
62d83a0c89 Merge "Audio effects: modified command() parameter types." into gingerbread 2010-07-28 07:48:49 -07:00
Eric Laurent
a4c72acfbc Audio effects: modified command() parameter types.
The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
2010-07-28 05:49:21 -07:00
Mike Lockwood
c40d714ca5 Merge "Tethering: Use new ACTION_USB_STATE broadcast to monitor USB connected state" into gingerbread 2010-07-28 04:04:18 -07:00
Mathias Agopian
51c70e3e41 fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.
this situation happened when the last buffer needed to be resized
(or allocated, the first time). the assumption was that the buffer
was in use by SF itself as the current buffer (obviously, this
assumption made no sense when the buffer had never been allocated, btw).

the system would wait until some other buffer became the "front" buffer.

we fix this problem by entirely removing the requirement that the
buffer being resized cannot be the front buffer. instead, we just
allocate a new buffer and replace the front buffer by the new one.

the downside is that this uses more memory (an extra buffer) for a
brief amount of time while the old buffer is being reallocated and
before it has actually been replaced.

Change-Id: I022e4621209474ceb1c671b23deb4188eaaa7285
2010-07-27 20:11:35 -07:00
Brad Fitzpatrick
b73045935c Merge "Cap the size of StrictMode buffering we do before calling DropBox." into gingerbread 2010-07-27 18:34:08 -07:00
Brad Fitzpatrick
e73eb53125 Cap the size of StrictMode buffering we do before calling DropBox.
Change-Id: I46ea767bd0153c745e9b7eff945dacf5130f8807
2010-07-27 16:54:39 -07:00
Andreas Huber
84047bc295 Add a missing break; to restore old functionality and not turn off the screen after 30secs regardless of system preference.
Change-Id: I6d160a1851e1f73bac3775d24cf70d46da59aa47
2010-07-27 16:49:10 -07:00