4443 Commits

Author SHA1 Message Date
Mike Lockwood
a31560598a Rename android.provider.Mtp to android.provider.Ptp
We are only supporting the PTP subset of MTP in host mode and have
no plans for full MTP, so calling it Mtp was misleading.

Also moved ACTION_MTP_SESSION_END Intent name to android.provider.MediaStore
and added it to the public API.

Change-Id: Ie35d15864d5972e65a39b982aa51316ecca3725a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 10:30:31 -05:00
Dianne Hackborn
1c24e957ad Fix issue #3222014: Dragging items around home screen is unresponsive
Also make the dim fade duration configurable, with a configured value
that more closely matches what UX wants.

Change-Id: Id32e2de14a2a2003d8fade6331377d8d723ac397
2010-11-23 00:40:52 -08:00
Brad Fitzpatrick
6804433b0a StrictMode visual notification support.
Change-Id: I64a5adb683060d9649f1132414547bb3c346a2a8
2010-11-22 19:39:52 -08:00
Dianne Hackborn
621e17de87 Implement issue #3221502: New APIs to support new back stack / task navigation
What this adds:

- A new Intent activity flag to completely replace an existing task.
- A new Intent activity flag to bring the current home task up behind
  a new task being started/brought to the foreground.
- New versions of startActivity() that take an array of Intents to be
  started, allowing applications to start a task in a specific state.
- A public moveTaskToFront() method on ActivityManager, with a new flag
  that allows the caller to have the task moved to the front with the
  current home task immediately behind it.

Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
2010-11-22 18:35:55 -08:00
satok
4e4569dab5 Add an API to get shortcut IMEs
- If there are no selected shortcut IMEs, the most applicable voice input will be selected as a shortcut IME

Change-Id: Ibd0f7ef5101013569c303820a3adc9038a97356d
2010-11-23 10:26:11 +09:00
satok
e9811d7dd4 Merge "Synchronize getCurrentInputMethodSubtype" 2010-11-22 15:17:37 -08:00
satok
3ef8b29fa0 Synchronize getCurrentInputMethodSubtype
Change-Id: I8bcedb39baba10e7035d5c1c11f41f74943874d1
2010-11-23 06:20:23 +09:00
Joe Onorato
794be40f8b new battery assets
Change-Id: I61331a6eb237f8883bf604c0767623b08c2fa41b
2010-11-21 19:22:25 -08:00
Joe Onorato
3fe7f2f2e3 fix warning
Change-Id: I243e9b81256af13b8296dd121b1204caed7a3996
2010-11-21 16:16:28 -08:00
Joe Onorato
46439cec0e Update the look of the notifications. Includes adding a new Notification.Builder class.
Change-Id: I7c57b81c45defe77d6f3d22472e9cf8432bbed03
2010-11-21 16:16:27 -08:00
Andy Stadler
1f35d487ba Fixes to DevicePolicyManager.setPasswordExpirationTimeout
* Fix permissions problem in DevicePolicyManager
* Allow short timeouts (primarily for testing)
* Remove unused debugging code

Bug: 3212583
Change-Id: I3770b1c6f090363e8e8d65db92839cd53de05c45
2010-11-19 16:08:24 -08:00
Eric Laurent
d48124e0fe Merge "Fix issue 3157123." 2010-11-19 15:58:24 -08:00
Eric Laurent
f3d6dd0782 Fix issue 3157123.
Use a Mutex wherever atomic operations were used in AudioTrack,
AudioRecord, AudioFlinger and AudioEffect classes.

Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
2010-11-19 15:49:42 -08:00
Dianne Hackborn
880119bf43 Implement issue #2367442: Please add API for manipulating installer
package names

Change-Id: I0563e896a47ae1a6e77aebc2d624fb1bde52ffbc
2010-11-19 13:21:08 -08:00
Robert Greenwalt
434203a277 Notify all VMs when proxy changes.
bug:2700664
Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87
2010-11-19 10:24:30 -08:00
Dianne Hackborn
8e11ef0d94 Some work on issue #3201795: Improve transition when keyboard comes up
Now try to slide dialogs if they end up moving due to the IME (or
other system things) showing/hiding.  Pretty hackish, but seems to
work.

Change-Id: Icd297e941cf847fa920c9605145c46be63043d52
2010-11-18 19:57:49 -08:00
Eric Laurent
3fc78a59b6 Fix issue 3192794.
Delay uevent registration and initialization or wired accessories state
until boot is completed.

Change-Id: I272fc9fbf6c34e17d211360c30c712f72ac5bb5e
2010-11-18 16:18:27 -08:00
Mathias Agopian
04d93980ec am 550b1e17: am 671a6ff4: Add support for virtual sensors.
* commit '550b1e17c332b1302299af0b3a8a2fa81d7cde65':
  Add support for virtual sensors.
2010-11-18 15:55:31 -08:00
Mathias Agopian
550b1e17c3 am 671a6ff4: Add support for virtual sensors.
* commit '671a6ff4be11b3e2d8eb017e0c7a78e6133fb2b8':
  Add support for virtual sensors.
2010-11-18 15:52:14 -08:00
Mathias Agopian
671a6ff4be Add support for virtual sensors.
Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.

the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.

The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used

For this purpose an "identity" is associated with each real sensor
activation, so we can track them.

On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.

Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800
2010-11-18 15:29:05 -08:00
satok
884ef9a11f Return the enabled subtypes for the current InputMethod when the input value of getEnabledInputMethodSubtypeList was null
Change-Id: I6892064dbc2214946871a0ba4ad08e00a2eb6c7b
2010-11-18 10:47:12 +09:00
Praveen Bharathi
7526da4bf2 frameworks:audio: Correct accessory detection at power up
In the init loop, when all the accessories are detected the
state of previous accessory is overridden by the state of the
next accessory. Adding the one line change keeps the state of
all the detected accessories intact.

Change-Id: I4347d8daa27800426dcfb23aac199bed4add67de
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
2010-11-17 10:53:41 -08:00
Jean-Michel Trivi
05b07fd204 Merge "Add new audio mode for audio communications other than telelphony." 2010-11-17 09:49:23 -08:00
satok
67ddf9cbd5 Add a function to get enabledInputMethodAndSubtype
Change-Id: Ie97635343249aa63e33028c2843cab103125ca92
2010-11-17 13:59:56 +09:00
Chris Tate
0de1ed5bdf Merge "Permission fix: don't require BACKUP perm for self-restores" 2010-11-16 18:44:06 -08:00
Chris Tate
44ab8453e1 Permission fix: don't require BACKUP perm for self-restores
The public API is not supposed to require the BACKUP permission in order
for an application to restore its own last-known-good backup data.  However,
as currently implemented, BackupManager.requestRestore() [the public API
in question] depends on private Backup Manager methods that *do* enforce
that permission.  The net result is that the method cannot be successfully
used by third party applications: it will throw an exception if attempted.
This CL restructures the permission checking involved.

First, the underlying beginRestoreSession() operation can now be passed a
'null' transport name; if this is done, then the restore session is begun
on whatever the currently-active transport is.  Looking up the name of the
active transport is one of the permission-guarded actions that was required
with the initial implementation.

Second, a package name can now be passed to beginRestoreSession().  If
this is done, then the restore session can only be used to perform a
single-package restore of that one application.  The BACKUP permission is
not required if the caller is tying the restore to its own package name.

In combination, these changes permit BackupManager.requestRestore() to
function without the calling app needing to hold any special permission.
The no-permission case is intentionally quite narrow:  the caller must
hold the permission unless they both (a) pass 'null' for the transport
name, thereby accepting whatever the currently active transport is, and
(b) pass their own package name to restrict the restore session only
to their own app.

External bug http://code.google.com/p/android/issues/detail?id=10094
Internal bug 3197202

Change-Id: Ibc9d652323f2da03727d850f991b4096af6520d2
2010-11-16 16:57:29 -08:00
Jean-Michel Trivi
8f677d66d9 Add new audio mode for audio communications other than telelphony.
The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
2010-11-16 10:23:37 -08:00
Brad Fitzpatrick
6689ac8a56 Fix more things that CloseGuard found.
Not terribly happy with how the code looks after, though.

Change-Id: I7bf5f78ef6c0ac82339a2e49488ca6e64d13c05e
2010-11-15 16:26:04 -08:00
Mathias Agopian
69e2d97ab1 am f11bf284: am 305bc0fe: Merge "Fix a race condition in sensormanager" into gingerbread
* commit 'f11bf284d355e2a8378c6a37a7ed702705ec6144':
  Fix a race condition in sensormanager
2010-11-15 13:22:16 -08:00
Mathias Agopian
f11bf284d3 am 305bc0fe: Merge "Fix a race condition in sensormanager" into gingerbread
* commit '305bc0fe977f6197bfae847dbaf58916cf8980ba':
  Fix a race condition in sensormanager
2010-11-15 13:19:46 -08:00
Brad Fitzpatrick
725d8f06ec Close some things in system_server that CloseGuard found.
Change-Id: I788c022235caddcb1972a34131442a683cd51eb5
2010-11-15 11:12:42 -08:00
Mathias Agopian
f33a6e9645 Fix a race condition in sensormanager
the per-connection state assumed the main sensorservice
lock was held during access. This is however not true while
pre-processing the events just before sending them to clients.
Therefore, there was a small window during which this state
could be modified while being used.

we now have an internal lock that protects this state.

Change-Id: I594680f20f09d6a4f1f38f093a1d3f650dcef1be
2010-11-14 20:55:25 -08:00
Dianne Hackborn
7eec10e6c9 Get rid of the extended themes.
We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated.  To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.

Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.

Also Add a DialogWhenLarge variation for the light theme.

Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
2010-11-14 14:23:42 -08:00
satok
b66d287e30 Add a setter of InputMethodSubtype to InputMethodManager
- Public API: void setCurrentInputMethodSubtype(int pos)

Change-Id: I55daa19ba924999def544bf841f00bf54852f3e1
2010-11-13 09:49:59 +09:00
satok
03eb319a3a Reset IME to the build-in IME when there is something wrong with the current IME.
Bug: 3186000

- By this change, there will be no need to find new applicable IME in Settings application
- This change handles the edge case that there is something wrong with the current IME

Change-Id: Idb42b6184ac135370064b967305faa81f1b382b2
2010-11-13 09:30:50 +09:00
satok
735cf38b8c Add a function to switch back to the last used IME
Change-Id: Iac7bcc2ee16dd04d91a3e75b160622d246788c9a
2010-11-13 08:00:25 +09:00
Jean-Michel Trivi
1a22bdb01a Add support for audio recording source in generic audio policy mgr.
Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
2010-11-12 14:35:52 -08:00
Jim Miller
a4e28d1819 Add password expiration support to DevicePolicyManager.
Change-Id: Ib2629ec547c123ac489d7f4cbd4e0a1d4aa07620
2010-11-11 19:43:24 -08:00
Eric Laurent
fc1bbf1b7d Merge "Temporary workaround for issue 3187563" 2010-11-11 17:24:27 -08:00
Eric Laurent
065299b58d Temporary workaround for issue 3187563
The audio HAL does not always handle properly simultaneous input and output stream
state changes. This happens in particular when starting video record because output
stream starts and stops while input is active.

Temporary disable the video record jingle the time the audio HAL issues are solved.

Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
2010-11-11 16:47:38 -08:00
Jamie Gennis
7ab17a3426 Merge "Implement reducing the buffer count of a Surface." 2010-11-11 15:26:21 -08:00
Mathias Agopian
e1ccfb7f6e am 792b847e: am fcab475c: Merge "record the last event received regardless of having clients or not" into gingerbread
* commit '792b847ee117c3c21b2859635caa7e7ec39d9c20':
  record the last event received regardless of having clients or not
2010-11-11 14:52:37 -08:00
Mathias Agopian
792b847ee1 am fcab475c: Merge "record the last event received regardless of having clients or not" into gingerbread
* commit 'fcab475c906da5c159bc56a32c2610f6f55eafd9':
  record the last event received regardless of having clients or not
2010-11-11 14:49:35 -08:00
Jamie Gennis
6c925d00e1 Implement reducing the buffer count of a Surface.
Change-Id: I7f979c60c06d654aa8265002836277434bc1a64f
Bug: 3095167
2010-11-11 14:06:38 -08:00
Jamie Gennis
7869c52370 Merge "Remove a problematic empty update optimization." 2010-11-11 13:49:38 -08:00
Brad Fitzpatrick
e7520d89fe StrictMode.Span support
Support for annotating critical regions (e.g. animations) with
a tag to be uploaded.

Change-Id: I412fc78f40dc05c9a3c9f62a4b0463201dbdb767
2010-11-11 09:46:07 -08:00
satok
723a27ef3d Save the history of InputMethodSubtype for reverting the subtype when IME was changed.
- Re-revert the change https://android-git.corp.google.com/g/#q,78962,n,z
*** If you want to see the diff between reverted change and new change, please see the diff between patch set 1 and the latest patch set

- TODO: Add a public function "switchToLastInputMethod"

Change-Id: Ic85d54b3b68e47a22360acaeb81202a366a34586
2010-11-11 17:13:10 +09:00
Mathias Agopian
3a9223ebf8 record the last event received regardless of having clients or not
We only recorded the last received event (which is needed when a sensor
is activated on a connection) when there was some connection active.
This should fix an issue where sometimes the light sensor doesn't
return an event whent activated.

we also didn't need to hold the main lock while dispatching events
to clients.

Change-Id: I6c6386c040051ce205e3c0516c678e0603fa45e1
2010-11-10 17:50:28 -08:00
Adam Cohen
a02fdf1ba0 Adding widget auto-advance capability
Change-Id: I058573f40a48fd7b5c2efa5f1041a1199919a51a
2010-11-10 17:18:37 -08:00
Jamie Gennis
d267d2a2f1 Remove a problematic empty update optimization.
This change removes an optimization from SurfaceFlinger that skipped
composition when it got window updates that had an empty dirty region.
This optimization caused problems because it would skip the hwcomposer
set call, which could leave the window's previous frame buffer bound to
an overlay plane.  When the application subsequently dequeued and tried
to lock its next buffer (which would be the buffer currently bound to
the overlay), the lock call would block until the next hwcomposer set
call (which may never happen).

Change-Id: I563b626a1d52c1f30eb82489eae0ceb4edc79936
Bug: 3138752
2010-11-10 15:09:09 -08:00