Permalink
Browse files

Merge branch 'froyo' into froyo-arabic

  • Loading branch information...
2 parents 4c79b25 + 5b1d7ee commit 0086af9bececff8338cfbd7e55e81df88e3889ab @samer72 committed Nov 10, 2011
Showing 2,691 changed files with 14,082 additions and 2,437 deletions.
View
@@ -100,6 +100,7 @@ LOCAL_SRC_FILES += \
core/java/android/bluetooth/IBluetoothA2dp.aidl \
core/java/android/bluetooth/IBluetoothCallback.aidl \
core/java/android/bluetooth/IBluetoothHeadset.aidl \
+ core/java/android/bluetooth/IBluetoothHid.aidl \
core/java/android/bluetooth/IBluetoothPbap.aidl \
core/java/android/content/IContentService.aidl \
core/java/android/content/IIntentReceiver.aidl \
View
@@ -29016,6 +29016,50 @@
visibility="public"
>
</field>
+<field name="PERIPHERAL_COMBO_KEYBORD_POINTING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1472"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERIPHERAL_KEYBORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1344"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERIPHERAL_POINTING_DEVICE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1408"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PERIPHERAL_UNCATEGORIZED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1280"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="PHONE_CELLULAR"
type="int"
transient="false"
@@ -117369,6 +117413,17 @@
visibility="public"
>
</method>
+<method name="isExternalStorageRemovable"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<field name="DIRECTORY_ALARMS"
type="java.lang.String"
transient="false"
@@ -37,6 +37,7 @@
#include "CameraService.h"
#include <cutils/atomic.h>
+#include <cutils/properties.h>
namespace android {
@@ -261,8 +262,19 @@ CameraService::Client::Client(const sp<CameraService>& cameraService,
CAMERA_MSG_ZOOM |
CAMERA_MSG_FOCUS);
- mMediaPlayerClick = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
- mMediaPlayerBeep = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
+ char value[PROPERTY_VALUE_MAX];
+ property_get("ro.camera.sound.disabled", value, "0");
+ int systemMute = atoi(value);
+ property_get("persist.sys.camera-mute", value, "0");
+ int userMute = atoi(value);
+ if(!systemMute && !userMute) {
+ mMediaPlayerClick = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
+ mMediaPlayerBeep = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
+ }
+ else {
+ mMediaPlayerClick = NULL;
+ mMediaPlayerBeep = NULL;
+ }
mOverlayW = 0;
mOverlayH = 0;
@@ -986,32 +998,35 @@ status_t CameraService::Client::takePicture()
// snapshot taken
void CameraService::Client::handleShutter(
- image_rect_type *size // The width and height of yuv picture for
+ image_rect_type *size, // The width and height of yuv picture for
// registerBuffer. If this is NULL, use the picture
// size from parameters.
+ bool playShutterSoundOnly
)
{
- // Play shutter sound.
- if (mMediaPlayerClick.get() != NULL) {
- // do not play shutter sound if stream volume is 0
- // (typically because ringer mode is silent).
- int index;
- AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
- if (index != 0) {
- mMediaPlayerClick->seekTo(0);
- mMediaPlayerClick->start();
- }
+ if(playShutterSoundOnly) {
+ // Play shutter sound.
+ if (mMediaPlayerClick.get() != NULL) {
+ // do not play shutter sound if stream volume is 0
+ // (typically because ringer mode is silent).
+ int index;
+ AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
+ if (index != 0) {
+ mMediaPlayerClick->seekTo(0);
+ mMediaPlayerClick->start();
+ }
+ }
+ sp<ICameraClient> c = mCameraClient;
+ if (c != NULL) {
+ c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
+ }
+ return;
}
-
// Screen goes black after the buffer is unregistered.
if (mSurface != 0 && !mUseOverlay) {
mSurface->unregisterBuffers();
}
- sp<ICameraClient> c = mCameraClient;
- if (c != NULL) {
- c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
- }
mHardware->disableMsgType(CAMERA_MSG_SHUTTER);
// It takes some time before yuvPicture callback to be called.
@@ -1187,7 +1202,7 @@ void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, int32_
switch (msgType) {
case CAMERA_MSG_SHUTTER:
// ext1 is the dimension of the yuv picture.
- client->handleShutter((image_rect_type *)ext1);
+ client->handleShutter((image_rect_type *)ext1, (bool)ext2);
break;
default:
sp<ICameraClient> c = client->mCameraClient;
@@ -1516,4 +1531,4 @@ status_t CameraService::onTransact(
return err;
}
-}; // namespace android
+}; // namespace android
@@ -150,7 +150,7 @@ class CameraService : public BnCameraService
static sp<Client> getClientFromCookie(void* user);
void handlePreviewData(const sp<IMemory>&);
- void handleShutter(image_rect_type *image);
+ void handleShutter(image_rect_type *image, bool playShutterSoundOnly);
void handlePostview(const sp<IMemory>&);
void handleRawPicture(const sp<IMemory>&);
void handleCompressedPicture(const sp<IMemory>&);
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
#endif
char value[PROPERTY_VALUE_MAX];
- property_get("debug.sf.nobootanimation", value, "0");
+ property_get("persist.sys.nobootanimation", value, "0");
int noBootAnimation = atoi(value);
LOGI_IF(noBootAnimation, "boot animation disabled");
if (!noBootAnimation) {
@@ -329,6 +329,7 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
case SCHEDULE_LOW_MEMORY_TRANSACTION:
{
+ data.enforceInterface(IApplicationThread.descriptor);
scheduleLowMemory();
return true;
}
@@ -48,7 +48,6 @@
private final DatePicker mDatePicker;
private final OnDateSetListener mCallBack;
- private final Calendar mCalendar;
private final java.text.DateFormat mTitleDateFormat;
private final String[] mWeekDays;
@@ -112,7 +111,6 @@ public DatePickerDialog(Context context,
mTitleDateFormat = java.text.DateFormat.
getDateInstance(java.text.DateFormat.FULL);
- mCalendar = Calendar.getInstance();
updateTitle(mInitialYear, mInitialMonth, mInitialDay);
setButton(context.getText(R.string.date_time_set), this);
@@ -161,10 +159,9 @@ public void updateDate(int year, int monthOfYear, int dayOfMonth) {
}
private void updateTitle(int year, int month, int day) {
- mCalendar.set(Calendar.YEAR, year);
- mCalendar.set(Calendar.MONTH, month);
- mCalendar.set(Calendar.DAY_OF_MONTH, day);
- setTitle(mTitleDateFormat.format(mCalendar.getTime()));
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(year,month,day);
+ setTitle(mTitleDateFormat.format(calendar.getTime()));
}
@Override
@@ -380,7 +380,7 @@ public Window destroyActivity(String id, boolean finish) {
if (r != null) {
win = performDestroy(r, finish);
if (finish) {
- mActivities.remove(r);
+ mActivities.remove(id);
}
}
return win;
@@ -239,6 +239,14 @@ public boolean show(String initialQuery, boolean selectInitialQuery,
// Display the drop down as soon as possible instead of waiting for the rest of the
// pending UI stuff to get done, so that things appear faster to the user.
mSearchAutoComplete.showDropDownAfterLayout();
+
+ mSearchAutoComplete.post(new Runnable() {
+ public void run() {
+ // Restore default value for selection on-focus when avery things are draw
+ mSearchAutoComplete.setSelectAllOnFocus(true);
+ }
+ });
+
}
return success;
}
@@ -484,6 +492,10 @@ private void updateSearchAutoComplete() {
mSearchAutoComplete.setForceIgnoreOutsideTouch(true);
+ // Don't select text on first focus, because if user have hard keyboard, first letter will selected when UI are shown
+ // we reenable it after all view are loaded
+ mSearchAutoComplete.setSelectAllOnFocus(false);
+
// attach the suggestions adapter, if suggestions are available
// The existence of a suggestions authority is the proxy for "suggestions available here"
if (mSearchable.getSuggestAuthority() != null) {
@@ -273,7 +273,7 @@ public AtCommandResult process(String raw_input) {
// Ok we have a command that starts with AT. Process it
int index = 2;
AtCommandResult result =
- new AtCommandResult(AtCommandResult.UNSOLICITED);
+ new AtCommandResult(AtCommandResult.OK);
while (index < input.length()) {
char c = input.charAt(index);
@@ -598,7 +598,7 @@ public boolean startDiscovery() {
*/
public boolean cancelDiscovery() {
try {
- mService.cancelDiscovery();
+ return mService.cancelDiscovery();
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
}
@@ -201,6 +201,12 @@ public boolean hasService(int service) {
//public static final int AUDIO_VIDEO_RESERVED = 0x0444;
public static final int AUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448;
+ // Devices in the PERIPHERAL major class
+ public static final int PERIPHERAL_UNCATEGORIZED = 0x0500;
+ public static final int PERIPHERAL_KEYBORD = 0x0540;
+ public static final int PERIPHERAL_POINTING_DEVICE = 0x0580;
+ public static final int PERIPHERAL_COMBO_KEYBORD_POINTING = 0x05C0;
+
// Devices in the WEARABLE major class
public static final int WEARABLE_UNCATEGORIZED = 0x0700;
public static final int WEARABLE_WRIST_WATCH = 0x0704;
@@ -259,6 +265,8 @@ public int getDeviceClass() {
public static final int PROFILE_A2DP = 1;
/** @hide */
public static final int PROFILE_OPP = 2;
+ /** @hide */
+ public static final int PROFILE_HID = 3;
/**
* Check class bits for possible bluetooth profile support.
@@ -276,6 +276,33 @@
public static final String ACTION_PAIRING_CANCEL =
"android.bluetooth.device.action.PAIRING_CANCEL";
+ /** @hide */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_CONNECTION_ACCESS_REQUEST =
+ "android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST";
+
+ /** @hide */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_CONNECTION_ACCESS_REPLY =
+ "android.bluetooth.device.action.CONNECTION_ACCESS_REPLY";
+
+ /** @hide */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_CONNECTION_ACCESS_CANCEL =
+ "android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL";
+ /**
+ * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REPLY} intent.
+ * @hide
+ */
+ public static final String EXTRA_CONNECTION_ACCESS_RESULT =
+ "android.bluetooth.device.extra.CONNECTION_ACCESS_RESULT";
+
+ /**@hide*/
+ public static final int CONNECTION_ACCESS_YES = 1;
+
+ /**@hide*/
+ public static final int CONNECTION_ACCESS_NO = 2;
+
/** A bond attempt succeeded
* @hide */
public static final int BOND_SUCCESS = 0;
Oops, something went wrong. Retry.

0 comments on commit 0086af9

Please sign in to comment.