3266 Commits

Author SHA1 Message Date
Hung-ying Tyan
89a7180a24 Merge "SipService: ignore connect event for non-active networks." into gingerbread 2010-09-14 09:57:47 -07:00
Hung-ying Tyan
12bec5ddf5 SipService: ignore connect event for non-active networks.
+ sanity check and remove redundant code.

Change-Id: I4d3e226851ad7fc4d88ddcd0a5c58f7e33b6c14a
2010-09-15 00:49:02 +08:00
Kenny Root
3043441511 Merge "Dedupe timestamp in PackageSettings" into gingerbread 2010-09-14 09:29:48 -07:00
Brad Fitzpatrick
50d66f9fcd Unify some duplicate StrictMode-enabling code.
Change-Id: Ifb92f35d9e245dbdb5e201597d8be702bce9e8b8
2010-09-14 08:22:30 -07:00
Hung-ying Tyan
99bf4e45c4 SIP: remove dependency on javax.sip
and change errorCodeString to errorCode in
SipRegistrationListener.onRegistrationFailed().

Change-Id: Id9618f5a4b0effaed04f8b0dc60347499d9e4501
2010-09-14 20:29:02 +08:00
Jeff Brown
4fe6c3e51b Replace epoll() with poll() and rename PollLoop to Looper.
As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN.  Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports.  That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
2010-09-14 01:59:45 -07:00
Chung-yih Wang
7d137e40cd Fix the bug of authentication in an outgoing call.
Since we missed the check of another challenge header in the
proxy authentication response.

Change-Id: Ie5b9d22c6c55b4d65619d2194c88845e7dd59f15
2010-09-14 14:17:02 +08:00
Mathias Agopian
04262e9f84 Add logging of various important graphics events
There are 16 events logged in the event log:
SF_APP_DEQUEUE_BEFORE
SF_APP_DEQUEUE_AFTER
SF_APP_LOCK_BEFORE
SF_APP_LOCK_AFTER
SF_APP_QUEUE

SF_REPAINT
SF_COMPOSITION_COMPLETE
SF_UNLOCK_CLIENTS
SF_SWAP_BUFFERS
SF_REPAINT_DONE

SF_FB_POST_BEFORE
SF_FB_POST_AFTER
SF_FB_DEQUEUE_BEFORE
SF_FB_DEQUEUE_AFTER
SF_FB_LOCK_BEFORE
SF_FB_LOCK_AFTER

all events log the buffer conserned and a timestamp in microseconds.

by default the logging is not enabled, to turn it on:
adb shell service call SurfaceFlinger 1006 i31 1
adb shell setprop debug.graphic_log 1

The effect is immediate in SurfaceFlinger, but applications need to be
restarted.

Change-Id: Ifc2e31f7aed072d9a7dede20ff2ce59231edbec1
2010-09-13 23:16:58 -07:00
Hung-ying Tyan
4565933f03 Merge "SipService: deliver connectivity change to all sessions." into gingerbread 2010-09-13 19:53:58 -07:00
Hung-ying Tyan
d231aa880a SipService: deliver connectivity change to all sessions.
+ add DATA_CONNECTION_LOST to SipErrorCode
+ convert it to Connection.DisconnectCause.LOST_SIGNAL in SipPhone

http://b/issue?id=2992548

Change-Id: Ie8983c1b81077b21f46304cf60b8e61df1ffd241
2010-09-14 08:00:09 +08:00
Dianne Hackborn
8c5755aab5 Work on issue #2991868: A toast pops up informing users...
...that Market took over the screen after signing into a Google account

Don't warn the user about a new activity coming up on an activity that
is finishing.

Change-Id: I573073139d42a485473d0c8a7df450c1a23c35c3
2010-09-13 16:58:59 -07:00
Kenny Root
7d794fbd30 Dedupe timestamp in PackageSettings
Timestamp data was duplicated making the management of timestamp
unnecessarily complicated.

Change-Id: Ia13be6ee9809a314232453e8627a54f9c9d8374d
2010-09-13 16:34:05 -07:00
Dianne Hackborn
7e9f4eb260 Track client requests through location manager.
This fixes a problem where applications could ask the location
manager to do very heavy-weight things (like...  say... update
location every minute), which would get accounted against the
system instead of the application because ultimately it is the
system making the heavy calls (wake locks, etc).

To solve this, we introduce a new class WorkSource representing
the source of some work.  Wake locks and Wifi locks allow you
to set the source to use (but only if you are system code and thus
can get the permission to do so), which is what will be reported
to the battery stats until the actual caller.

For the initial implementation, the location manager keeps track
of all clients requesting periodic updates, and tells its providers
about them as a WorkSource param when setting their min update time.
The network location provider uses this to set the source on the
wake and wifi locks it acquires, when doing work because of the
update period.

This should also be used elsewhere, such as in the GPS provider,
but this is a good start.

Change-Id: I2b6ffafad9e90ecf15d7c502e2db675fd52ae3cf
2010-09-13 14:20:48 -07:00
Eric Laurent
bd2e9ec64d Merge "Fix volume problems with insert revert" into gingerbread 2010-09-13 09:14:39 -07:00
Eric Laurent
27a2fdfb8a Fix volume problems with insert revert
- Use a constant input level to the reverb engine and implement volume control in the
insert reverb. This avoids the volume spikes when an effect that was inserted after
the reverb is disabled or removed.
- Fix clicks (one silent buffer) at the end of the reverb disable period.
- Modified volume management in audioflinger so that the volume ramp is also done by
the insert effect if present when the track is paused (avoids clicks).
- Increased room level for all presets.

Also fixed problems with output stage session (-1):
- effect bundle wrapper was not designed to support session -1
- the permission check in audioflinger for using session -1 failed due to a wrong usage of
getCallingPid()

Change-Id: Id1ff51327263364bf71d3f2668fa5cde4311d84f
2010-09-13 09:08:28 -07:00
Hung-ying Tyan
3d7606aa60 SIP: enhance timeout and registration status feedback.
http://b/issue?id=2984419
http://b/issue?id=2991065

Change-Id: I2d3b1dd3a70079ff347f7256f4684aea07847f4e
2010-09-13 17:45:39 +08:00
Kenny Root
07a9e8d39f Merge changes Ie3648509,I53db73c3 into gingerbread
* changes:
  Move native library removal function to helper
  Initialize native library path in PackageSetting
2010-09-12 17:59:41 -07:00
Jeff Brown
b88102f5b7 Input dispatcher ANR handling enhancements.
This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in.  Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.

Added a .5 second deadline for processing app switch keys.  This behavior
predates Gingerbread but had not previously been ported.

Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.

Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR.  This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.

Added more comments to describe the tricky parts of PollLoop.

Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
2010-09-12 16:52:03 -07:00
Kenny Root
8f7cc02c7c Move native library removal function to helper
Moves the remoteNativeLibrariesLI call to NativeLibraryHelper to prepare
for being able to symlink the /data/data/<package>/lib dir to the ASEC
container.

Change-Id: Ie3648509c6b6293a8d9bdd815610ab408df5047f
2010-09-12 09:04:56 -07:00
Kenny Root
806cc13a08 Initialize native library path in PackageSetting
During boot-up we weren't paying attention to the nativeLibraryPath that
was read from the package settings XML file which reset the path to the
default /data/data/<package>/lib directory.

This adds nativeLibraryPath as an argument to the PackageSettings
constructor and related functions that will pull that value in from the
settings file.

It also removes the call to nativeLibraryDir.mkdir() which installd does
by itself.

Change-Id: I53db73c3b1bc90997a4a73f7f2fbaee125e6f67e
2010-09-12 09:04:48 -07:00
Brad Fitzpatrick
1e02d36b0f Enable strictmode logging in system_server & add a lock.
We weren't logging strictmode violation in the system_server process
in non-user builds (only system apps), even though the rest of the
strictmode logging supports it.

Also add a missing lock in ActivityManagerService.

Change-Id: If2af96a7e4fdde604a647b836097f0029ef1334b
2010-09-10 09:19:50 -07:00
Hung-ying Tyan
ca3c24db3a Merge "SIP: add SipErrorCode for error feedback." into gingerbread 2010-09-10 02:19:22 -07:00
Hung-ying Tyan
903e103160 SIP: add SipErrorCode for error feedback.
Change-Id: I8b071d4933479b780a403d0bfa30511f4c23ca8f
2010-09-10 17:15:06 +08:00
Dianne Hackborn
a7d868d4f9 Merge "Add toast when an app intercepts the launch of another app." into gingerbread 2010-09-09 21:31:34 -07:00
Dianne Hackborn
0dad364adb Add toast when an app intercepts the launch of another app.
The activity manager looks for cases where one app launches immediately
after another.  If this happens, a brief toast is shown telling the user
when app is actually running and what was originally starting.

Change-Id: If94cf5bd393dd0bc0f09789dae044fde1386c481
2010-09-09 21:25:35 -07:00
Rich Cannings
8d578836dc Remove the use of FileInputStream.available()
Bug: 2976294
Change-Id: I34b13cedbf1d2338163ef74454817c318a3a24f5
2010-09-09 16:28:48 -07:00
Mike Lockwood
76e4fa1926 Merge "Only pulse notification light if a new notification has been received since the screen was last turned off" into gingerbread 2010-09-09 14:02:19 -07:00
Robert Greenwalt
0727a865d8 Merge "Add network condition reporting." into gingerbread 2010-09-09 09:41:05 -07:00
Robert Greenwalt
d7085fcf65 Add network condition reporting.
Apps can report if they like their connection to the nets
and we display either not-really-connected or fully-connected
icons.  Final icons TBD.

bug:2978624
Change-Id: I28be52085edfe54571c0d4559aba0df883548654
2010-09-09 09:33:02 -07:00
Mike Lockwood
2117f6fa38 Only pulse notification light if a new notification has been received since the screen was last turned off
BUG: 2980248

Change-Id: I4dca527a191fae4ad87eeff8ad32594fd6aeb417
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-09 09:48:08 -04:00
Chung-yih Wang
4d1e012127 Change the keep-alive interval to 10 seconds.
Change-Id: I216cee622f57ee18533de3960d4da1a41e01f1ae
2010-09-09 13:27:10 +08:00
Brad Fitzpatrick
65634a7935 Merge "Don't block in the BackupManagerService.dataChanged() Binder call." into gingerbread 2010-09-08 15:20:20 -07:00
Dianne Hackborn
ee455f5a95 Merge "People holding partial wake locks now get blamed for CPU usage." into gingerbread 2010-09-08 14:15:35 -07:00
Jake Hamby
5872e9d7f3 Merge "Allow incoming SMS until internal storage is almost full." into gingerbread 2010-09-08 12:49:27 -07:00
Dianne Hackborn
0d903a84d0 People holding partial wake locks now get blamed for CPU usage.
For the duration of the wake lock, 50% of all CPU usage is now
accounted against the app(s) holding partial wake locks, evenly
distributed between them.  This is only while the device is on
battery and screen off.

Change-Id: I3e5c978b792b6ef17bf8540705bfe8343dadd464
2010-09-08 12:41:24 -07:00
Jake Hamby
bb37163323 Allow incoming SMS until internal storage is almost full.
Fix for bug 2382830: new incoming SMS should not be rejected when
running low on internal phone storage.

Testing revealed that the /data partition should have at least 256 KiB
available in order to prevent random app crashes (including system apps)
due to SQLite transaction failures. With 256 KiB free, the device should
safely boot without storage full errors. This takes into account the
36-40 KiB that the YAFFS2 filesystem reports as available even after
the partition has been completely filled. I've set the default full
threshold to 1 MiB to provide a generous safety margin.

For this bug, I changed the DeviceStorageMonitorService demon to send
two new hidden notifications for device storage "full" and "not full",
when the free space falls below the full threshold (default 1 MiB,
but configurable as a system setting), in addition to the existing
storage low/okay notifications sent when the storage crosses the threshold
of 90% full (also configurable).

The SMS code was changed to use these new notifications so that it can
accept messages until the data partition has been filled to the maximum
safe capacity rather than stopping when it hits 90% full. There should
be no negative impact on battery life because the additional check in
the storage polling service should be offset by an optimization to cache
the free threshold values which were previously being computed every time
through the loop.

While testing this change, I discovered that SMSDispatcher was being
instantiated twice, the first time in GSMPhone/CDMAPhone, and the second
time in SimSmsInterfaceManager / RuimSmsInterfaceManager. Changed the code
to pass the original SMSDispatcher to the Sim/RuimSmsInterfaceManager
constructor.

Change-Id: Ie0c6d05294778ab6ee42e0fa01313af96d824c77
2010-09-08 12:37:18 -07:00
Jeff Brown
b21fb104cc Fix key repeat delay.
Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
2010-09-08 12:28:43 -07:00
Jeff Brown
85a3176704 Add support for secure views.
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
2010-09-08 11:50:55 -07:00
Brad Fitzpatrick
3dd42334ee Don't block in the BackupManagerService.dataChanged() Binder call.
This unnecessarily blocks callers.

Bug: 2977348
Change-Id: I5267e575cdd5eb2136379f9710126b62a1bd75ad
2010-09-07 23:40:30 -07:00
Chung-yih Wang
5de1d36dd0 Log outbound proxy address if exists for debugging.
Change-Id: I2d2dffe3536e674b6956164c400e397c2f00f212
2010-09-08 13:15:55 +08:00
Hung-ying Tyan
1b1601d740 SipService: unset session listener if listener is gone.
Change-Id: I0b85ee7bcb32c24cf64dfc3edc40c0cad9717562
2010-09-05 00:26:11 +08:00
Dianne Hackborn
e25b4bc76f Merge "These are not ready to be exposed. Also rename them to be better." into gingerbread 2010-09-03 13:24:33 -07:00
Dianne Hackborn
482566ed5c These are not ready to be exposed. Also rename them to be better.
Change-Id: I7c234144497084b7769f8c46761b7d74d1c583d5
2010-09-03 12:51:28 -07:00
Marco Nelissen
d85621c938 Don't crash when extra logging is enabled.
Change-Id: I76cf8db0f51ed33e91acee9636180e8d7c0b5ff9
2010-09-03 11:46:19 -07:00
Kenny Root
305bcbf0c9 Decrease PackageManagerService wait time for vold
Up the blocking queue maximum to twice the number of containers we
allow which should let "asec list" complete without blocking the thread
several times.

Change the threads for the NativeDaemonConnector to vold and netd to be
more descriptive instead of the same name.

Bug: 2501075
Change-Id: I7e7949845a6c70a3d619aec0fa79ceef3c17a4be
2010-09-03 09:33:34 -07:00
Kenny Root
12da9d7472 Fix buffer compacting in NativeDaemonConnector
The buffer was being compacted in the read loop, but the start offset on
the compacted buffer wasn't being considered after the next read.

Bug: 2501075
Change-Id: I163297d751cf800d0bbc66df66b1a0fa0785de49
2010-09-02 22:24:06 -07:00
Eric Laurent
32ec1ad17f Merge "Fix problem in AudioEffect::command() status." into gingerbread 2010-09-02 12:46:24 -07:00
Eric Laurent
e65280c552 Fix problem in AudioEffect::command() status.
The *pReplyData argument of the command() function was left unitialized by EffectHandle::command()
when command was EFFECT_CMD_ENABLE, EFFECT_CMD_DISABLE and EFFECT_CMD_SET_PARAM_COMMIT.

Change-Id: I91a19817ead2a8cfbdd8e2d77ca270c7ce9d5bd4
2010-09-02 11:56:55 -07:00
Chia-chi Yeh
95b15c3560 SipService: reduce the usage of javax.sdp.*.
After this change, SipAudioCallImpl is the only place still using it.

Change-Id: I5693bffa54f9e19cbfa70b45dfcf40fba04dedbb
2010-09-02 22:15:26 +08:00
Dianne Hackborn
a1c69e084b Fix a small bug when granting permissions through activity results.
Change-Id: I2a5c4025fb5f566e29c219fde4d50ed2eba6e174
2010-09-01 22:55:02 -07:00