24892 Commits

Author SHA1 Message Date
Nick Kralevich
05f0382bcf When dropping privileges, check return values.
setuid() and family can fail.  Check return values to make
sure this doesn't happen unexpectedly.

Also call setgid() to drop root group permissions.

Change-Id: Id06fbe6239e2ed2fe23368695e333514e0581e6d
2010-09-01 14:44:54 -07:00
Andreas Huber
81f339bcfe Merge "Fixing the build." into gingerbread 2010-09-01 14:21:49 -07:00
Andreas Huber
752fe99276 Fixing the build.
Change-Id: I6414a5ed2a92f5e375e19caf7453abd268ce76d3
2010-09-01 14:20:33 -07:00
Kenny Root
7c1bd7fdbf Fix logic error in downgrade of system apps
A logic error would allow not deleting data when uninstalling a system
app upgrade that's of a newer release than the on on the system
partition. If the system app had a database upgrade and this happened,
you might be in trouble.

Luckily it appears no one ever does this in code. You'd have to manually
get there doing:

adb uninstall -k updated.system.package

Change-Id: I3110fedf2d147975a0635c71898d985dd642a2c1
2010-09-01 14:10:36 -07:00
Kenny Root
fca5677aee Merge "Add null check for package settings" into gingerbread 2010-09-01 14:09:01 -07:00
Kenny Root
9ee9274e5e Add null check for package settings
A few lines down "ps" is run through a null check, so apparently there
could be some screwy system conditions where this is encountered. And,
in fact, this was encountered through an updated system pacakge that
managed to delete the package from /system/app during testing. It left
the PackageSetting in mDisabledSysPackages which would cause a deference
of a null variable.

Change-Id: Ic7faca569abd16a87a8a69c20df08c11a274a001
2010-09-01 13:59:02 -07:00
Adam Powell
e34fe69e66 Merge "DO NOT MERGE Integrate edge effects into WebView." into gingerbread 2010-09-01 13:57:05 -07:00
Andreas Huber
6c33904ad9 Merge "Now that AmrInputStream no longer relies on opencore, make sure it's registered in non-opencore builds." into gingerbread 2010-09-01 13:54:12 -07:00
Andreas Huber
412fc7cdb6 Merge "Keep gtalk video chat specific code consistent with rtsp changes." into gingerbread 2010-09-01 13:39:27 -07:00
Andreas Huber
8d7d413959 Now that AmrInputStream no longer relies on opencore, make sure it's registered in non-opencore builds.
Change-Id: Ia9748691ba60d3c4b5fcaf319ed0b4493d69abc6
related-to-bug: 2963846
2010-09-01 13:27:14 -07:00
Andreas Huber
de2b1615d2 Merge "Properly extract all raw_data_blocks from an ADSP mpeg4 audio buffer." into gingerbread 2010-09-01 12:59:04 -07:00
Andreas Huber
4dcc6a1020 Properly extract all raw_data_blocks from an ADSP mpeg4 audio buffer.
Change-Id: I15e21eae50beb6057024ea42a7e9bf3b8d8a0603
related-to-bug: 2368598
2010-09-01 12:25:36 -07:00
Adam Powell
230269d43b DO NOT MERGE Integrate edge effects into WebView.
TODO Effect for scaling gestures; asset/polish tweaks.

Change-Id: Ifbc201cb64e0610dbc92a7c57ba0d3a4ee686c43
2010-09-01 11:56:56 -07:00
Daniel Sandler
b1387127f1 Merge "Fix build (restore deleted assets)." into gingerbread 2010-09-01 11:46:16 -07:00
Daniel Sandler
a3c3edc68f Fix build (restore deleted assets).
Change-Id: I89362191131e2e8e3d276ab8444edd0d5041211c
2010-09-01 14:43:59 -04:00
Derek Sollenberger
1614843e93 Merge "Fix invalid comment in WebSettings." into gingerbread 2010-09-01 11:30:12 -07:00
Derek Sollenberger
fdbdeb3137 Fix invalid comment in WebSettings.
The get/set for the pluginPath is leftover from the Gear's plugin
and is no longer useful now that plugins are loaded from their
own APK using the package manager. These methods were modified to
be no-ops in froyo, but the documentation was never completed.

Change-Id: I20f6593445d877a3dae9b9f51d5198a3509255d6
http://b/2811032
2010-09-01 14:15:50 -04:00
Daniel Sandler
8f8fcfa319 Notifications are now light-on-dark in the windowshade.
Finally.

This also fixes that little 1px gap that would occasionally
show through to the carbon fiber background (changed to
steel cord for now) between the last notification and the
windowshade's handlebar. It still gaps a little while you're
dragging, due to the asynchronous motion of the various
windows involved, but when the panel is still you shouldn't
see any background. (Man, that drove me crazy.)

Bug: 2949229

Change-Id: If085f4ab7dfb7c3868c30469661907d5d63f070b
2010-09-01 14:02:30 -04:00
Brian Carlstrom
1751086360 New Java-based SamplingProfiler
Summary:
- libcore: new Java based SamplingProfiler
- dalvik: remove old SamplingProfiler native bits
- frameworks/base: New placeholder SamplingProfilerIntegration
- vendor/google: remove old profiler snapshot parsing code

Details:

libcore

   A new 100% Java SamplingProfiler. While it has more overhead that
   the old native one, the new one can actually collect more than the
   current PC and frame pointer, so you can get useful context of
   where your app is spending time. It currently provides ASCII hprof
   format output for use with tools like PerfAnal
	dalvik/src/main/java/dalvik/system/SamplingProfiler.java

    Unit test for the new SamplingProfiler
	dalvik/src/test/java/dalvik/system/SamplingProfilerTest.java

    Add core-tests-dalvik
	JavaLibrary.mk

dalvik

    Removing native code that supported the old SamplingProfiler
	vm/Dvm.mk
	vm/native/InternalNative.c
	vm/native/dalvik_system_SamplingProfiler.c

frameworks/base

  Placeholder SamplingProfilerIntegration. Later plans include
  generating EventStackTrace protobufs.

    New SamplingProfiler does not have a global instance, so
    SamplingProfilerIntegration provides one in INSTANCE. Old binary
    snapshot format is temporily replaced with ASCII hprof data.
	core/java/com/android/internal/os/SamplingProfilerIntegration.java

    Simplified interface for zygote profile snapshotting
	core/java/com/android/internal/os/ZygoteInit.java

    Current SamplingProfilerIntegration does not track event loop
    explicitly, but hprof information does include thread information.
	core/java/android/app/ActivityThread.java

vendor/google

    Removing code for parsing old SamplingProfiler snapshot format
	tools/samplingprofiler/Android.mk
	tools/samplingprofiler/NOTICE
	tools/samplingprofiler/profiler.iml
	tools/samplingprofiler/profiler.ipr
	tools/samplingprofiler/pull-snapshots.sh
	tools/samplingprofiler/sorttable.js
	tools/samplingprofiler/src/com/android/profiler/PrintHtml.java
2010-09-01 10:17:25 -07:00
Andreas Huber
27b9c8ec16 Keep gtalk video chat specific code consistent with rtsp changes.
Change-Id: I5f3f46c2150e16b26674432e427f79c04a69cd8e
2010-09-01 09:27:47 -07:00
Derek Sollenberger
73ef5d4e2b DO NOT MERGE. CHERRY-PICKED GERRIT CHANGE 60365.
Support complex characters in plugins.

Complex characters like chinese are sent via the onKeyMultiple()
callback. The WebView passes these characters to Webkit so that
non-text inputs (e.g. plugins) can process them.

Change-Id: I49575bb8a583f9f3580f5734ad87cc7c00b2bda9
http://b/2900114
2010-09-01 09:01:48 -04:00
Jesse Wilson
795b8aa4a3 Merge "Removing AWT. See bug 2732079" into gingerbread 2010-08-31 22:50:31 -07:00
Chung-yih Wang
042e9bd989 Add SIP related settings in the Settings.System.
Change-Id: I00b6daee42fa59b662a380f832f76e67ca9402bc
2010-09-01 10:02:07 +08:00
Dianne Hackborn
361199b5e7 Add PackageManager API to get information about a provider component.
Kind-of useful when all you have is a ComponentName.

Change-Id: I9a99f12daabb29e97e882e09c43ca0df70c00651
2010-08-31 18:59:04 -07:00
Dianne Hackborn
22cd420bfa Merge "Improve debug output when an ANR happens." into gingerbread 2010-08-31 18:56:30 -07:00
Dianne Hackborn
6b1afebdac Improve debug output when an ANR happens.
- Collect data at better times.
- Collect per-thread CPU usage as soon as possible after the ANR, and print
  in log.
- Based on new per-thread CPU usage, limit the number of processes we
  collect stacks from to not include inactive not interesting procs.
- Improve the way ProcessStats compute and reports its data.

Change-Id: I12b17fb47d593d175be69bb792c1f57179bf4fdf
2010-08-31 18:51:27 -07:00
Jesse Wilson
494dd30c5f Removing AWT. See bug 2732079
Change-Id: I0f29d1edbb90b081d743807605682cb64b53b1bc
2010-08-31 16:56:51 -07:00
Gilles Debunne
d2fbabad1e Merge "Fixed single line state on TextView." into gingerbread 2010-08-31 16:18:06 -07:00
Gilles Debunne
e67b58a347 Fixed single line state on TextView.
singleLine flag is set to false by default. However, when no singleLine or input
type is provided, the inputType of the TextView is not set to
EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE for edit texts.

Change-Id: Id747d3319afcddb3ab6ae0463947e8b3e470ef73
2010-08-31 16:02:18 -07:00
Jeff Brown
307ed31c93 Merge "Remove incomplete input device enumeration NDK API." into gingerbread 2010-08-31 15:45:32 -07:00
Eric Laurent
f560ceabe1 Merge "Audio Effects: fix problems in volume control." into gingerbread 2010-08-31 15:43:36 -07:00
Eric Laurent
a92ebfa1cd Audio Effects: fix problems in volume control.
- Fixed click when re-enabling effect during the turn off phase:
make sure the effect states where effect is processed are the same
where volume control is delegated to effect.
- Fixed click when effect is deleted while still active: do not apply
volume ramp if an effect having volume control was just removed from the
effect chain.

Also fixed a crash when PCM dump is enabled in effect bundle wrapper.

Change-Id: Ib562f5cf75c69af75df0e862536262e2514493e4
2010-08-31 15:26:23 -07:00
Jeff Brown
5fad2675e8 Remove incomplete input device enumeration NDK API.
Change-Id: I32de74ff5fcf0e29179a2aee03ddabd22fa485bb
2010-08-31 15:24:55 -07:00
Joe Onorato
47471175c9 Can't have two rules building the stubs and public.xml!
Change-Id: I27b113d436aa5f945c5d6d56258dbafdf71193cf
2010-08-31 15:11:11 -07:00
Brad Fitzpatrick
63070856d0 Merge "Don't propagate StrictMode over one-way Binder calls." into gingerbread 2010-08-31 14:58:26 -07:00
Andreas Huber
48ac68e1b1 Merge "Support for RFC3640 - mpeg4-generic RTP packet type, AAC-lbr and AAC-hbr." into gingerbread 2010-08-31 14:54:37 -07:00
Andreas Huber
99fa510e67 Merge "Better detection of connection problems - timeout if no rtcp packets arrive within a certain time, not a final frame (which may take longer)" into gingerbread 2010-08-31 14:41:51 -07:00
Jake Hamby
6659284d68 Allow Bluetooth radio to be toggled in Airplane mode.
Add "bluetooth" to the list of toggleable radios. Because this string
is in the Settings DB, I had to bump the version number. Why is this in
the settings DB anyway, rather than a carrier config option?

I also discovered that the SystemUI package copied the entire contents of
res/values/defaults.xml from SettingsProvider, when I originally tried
to update the unreferenced SystemUI version of the setting. To prevent
future confusion, I removed all of the values from the SystemUI version
of res/values/defaults.xml.

Change-Id: Ib8a75c85b9db5c1963b65538ee2765d5087e67d2
2010-08-31 14:37:30 -07:00
Xavier Ducrohet
2382755730 Merge "Add a --debug-mode option to aapt." into gingerbread 2010-08-31 14:30:03 -07:00
Andreas Huber
e536f800c6 Support for RFC3640 - mpeg4-generic RTP packet type, AAC-lbr and AAC-hbr.
Change-Id: Ied92ea8c2448a2cb1a732c72c21c69da1913dbc8
related-to-bug: 2556656
2010-08-31 14:25:36 -07:00
Brad Fitzpatrick
0234376503 Don't propagate StrictMode over one-way Binder calls.
This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.

The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required.  The additional
work is just same-thread getter/setters on the existing
IPCThreadState.

Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
2010-08-31 13:16:49 -07:00
James Dong
6aacad66eb Merge "Add some encoding parameters for the "record" utility" into gingerbread 2010-08-31 13:13:18 -07:00
Joe Onorato
54901c9e84 fix the build. will revisit this change in a minute
Change-Id: Ibac9e777ea7332d63ddaf2e3b8935e56a663ebbe
2010-08-31 12:53:18 -07:00
Joe Onorato
77881293ad DO NOT MERGE - Back port change from master that enforces correctness in the javadoc comments.
Change-Id: I42956ccb3a32b3bd7c573bb2175e4ec230613dbf
2010-08-31 12:00:03 -07:00
James Dong
d31c89f45c Add some encoding parameters for the "record" utility
- TODO: remove some of the hard coded values

Change-Id: Ib58bbb8af45fd102176ac49da0a71613a12fa5fc
2010-08-31 11:53:54 -07:00
Andreas Huber
3a48d4d726 Better detection of connection problems - timeout if no rtcp packets arrive within a certain time, not a final frame (which may take longer)
Change-Id: I3c1ae79bb9342770e959ebdcdc6b748549b76330
related-to-bug: 2556656
2010-08-31 11:13:51 -07:00
Xavier Ducrohet
6487b09923 Add a --debug-mode option to aapt.
When passed (with no needed parameters) to the aapt command line,
aapt will insert debuggable=true in the application node of the manifest
automatically.

This is to be used by the SDK tools to make true "debug" builds
that require no code/file change.

Change-Id: I6f0a7af7b7d51f26bb0ec012e6f142a6060b8618
2010-08-31 11:07:56 -07:00
Jeff Brown
6eb5ac9cee Fix doc link in InputDevice.
Change-Id: I3b356b8e3803661ccfe5bb4812021b6c6d576d21
2010-08-30 23:29:07 -07:00
Chia-chi Yeh
12006013cc fixedfft: Only includes cpu-features.h when __arm__ is defined.
Change-Id: Ifb6c03b38eff3c94a507ceb5043fcc48b364c25c
2010-08-31 12:56:01 +08:00
Adam Powell
0a77ce277c New edge effects for scrolling widgets (overscroll)
TODO: Currently disabled for WebView. Assets used for the glow effect
need to be themable/styleable. Overscroll effect should take place
even when the user did not grab the widget within actual content.

Change-Id: I68277d14d37dc5bcdb9254eaddf6e4998b3f2bf4
2010-08-30 19:14:07 -07:00