Merge branch 'eclair-plus-aosp' of ssh://android-git.corp.google.com:29418/platform/frameworks/base into eclair-mr2-plus-aosp
This commit is contained in:
@@ -287,9 +287,13 @@ public final class BluetoothDevice implements Parcelable {
|
|||||||
/** A bond attempt failed because of repeated attempts
|
/** A bond attempt failed because of repeated attempts
|
||||||
* @hide */
|
* @hide */
|
||||||
public static final int UNBOND_REASON_REPEATED_ATTEMPTS = 7;
|
public static final int UNBOND_REASON_REPEATED_ATTEMPTS = 7;
|
||||||
|
/** A bond attempt failed because we received an Authentication Cancel
|
||||||
|
* by remote end
|
||||||
|
* @hide */
|
||||||
|
public static final int UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
|
||||||
/** An existing bond was explicitly revoked
|
/** An existing bond was explicitly revoked
|
||||||
* @hide */
|
* @hide */
|
||||||
public static final int UNBOND_REASON_REMOVED = 8;
|
public static final int UNBOND_REASON_REMOVED = 9;
|
||||||
|
|
||||||
/** The user will be prompted to enter a pin
|
/** The user will be prompted to enter a pin
|
||||||
* @hide */
|
* @hide */
|
||||||
|
|||||||
@@ -698,6 +698,7 @@ public class ContactStruct {
|
|||||||
mPhotoList = new ArrayList<PhotoData>(1);
|
mPhotoList = new ArrayList<PhotoData>(1);
|
||||||
}
|
}
|
||||||
final PhotoData photoData = new PhotoData(0, null, photoBytes);
|
final PhotoData photoData = new PhotoData(0, null, photoBytes);
|
||||||
|
mPhotoList.add(photoData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class BluetoothEventLoop {
|
|||||||
private static final int EVENT_AUTO_PAIRING_FAILURE_ATTEMPT_DELAY = 1;
|
private static final int EVENT_AUTO_PAIRING_FAILURE_ATTEMPT_DELAY = 1;
|
||||||
private static final int EVENT_RESTART_BLUETOOTH = 2;
|
private static final int EVENT_RESTART_BLUETOOTH = 2;
|
||||||
private static final int EVENT_PAIRING_CONSENT_DELAYED_ACCEPT = 3;
|
private static final int EVENT_PAIRING_CONSENT_DELAYED_ACCEPT = 3;
|
||||||
|
private static final int EVENT_AGENT_CANCEL = 4;
|
||||||
|
|
||||||
private static final int CREATE_DEVICE_ALREADY_EXISTS = 1;
|
private static final int CREATE_DEVICE_ALREADY_EXISTS = 1;
|
||||||
private static final int CREATE_DEVICE_SUCCESS = 0;
|
private static final int CREATE_DEVICE_SUCCESS = 0;
|
||||||
@@ -90,6 +91,22 @@ class BluetoothEventLoop {
|
|||||||
mBluetoothService.setPairingConfirmation(address, true);
|
mBluetoothService.setPairingConfirmation(address, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EVENT_AGENT_CANCEL:
|
||||||
|
// Set the Bond State to BOND_NONE.
|
||||||
|
// We always have only 1 device in BONDING state.
|
||||||
|
String[] devices =
|
||||||
|
mBluetoothService.getBondState().listInState(BluetoothDevice.BOND_BONDING);
|
||||||
|
if (devices.length == 0) {
|
||||||
|
break;
|
||||||
|
} else if (devices.length > 1) {
|
||||||
|
Log.e(TAG, " There is more than one device in the Bonding State");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
address = devices[0];
|
||||||
|
mBluetoothService.getBondState().setBondState(address,
|
||||||
|
BluetoothDevice.BOND_NONE,
|
||||||
|
BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -544,6 +561,10 @@ class BluetoothEventLoop {
|
|||||||
private void onAgentCancel() {
|
private void onAgentCancel() {
|
||||||
Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL);
|
Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_CANCEL);
|
||||||
mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
|
mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
|
||||||
|
|
||||||
|
mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_AGENT_CANCEL),
|
||||||
|
1500);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ public class BluetoothService extends IBluetooth.Stub {
|
|||||||
return state.intValue();
|
return state.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized String[] listInState(int state) {
|
/*package*/ synchronized String[] listInState(int state) {
|
||||||
ArrayList<String> result = new ArrayList<String>(mState.size());
|
ArrayList<String> result = new ArrayList<String>(mState.size());
|
||||||
for (Map.Entry<String, Integer> e : mState.entrySet()) {
|
for (Map.Entry<String, Integer> e : mState.entrySet()) {
|
||||||
if (e.getValue().intValue() == state) {
|
if (e.getValue().intValue() == state) {
|
||||||
|
|||||||
@@ -6189,7 +6189,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
|
|||||||
|
|
||||||
final int drawingCacheBackgroundColor = mDrawingCacheBackgroundColor;
|
final int drawingCacheBackgroundColor = mDrawingCacheBackgroundColor;
|
||||||
final boolean opaque = drawingCacheBackgroundColor != 0 || isOpaque();
|
final boolean opaque = drawingCacheBackgroundColor != 0 || isOpaque();
|
||||||
final boolean translucentWindow = attachInfo.mTranslucentWindow;
|
final boolean translucentWindow = attachInfo != null && attachInfo.mTranslucentWindow;
|
||||||
|
|
||||||
if (width <= 0 || height <= 0 ||
|
if (width <= 0 || height <= 0 ||
|
||||||
// Projected bitmap size in bytes
|
// Projected bitmap size in bytes
|
||||||
|
|||||||
@@ -158,4 +158,6 @@
|
|||||||
<!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
|
<!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
|
||||||
<bool name="config_disableMenuKeyInLockScreen">false</bool>
|
<bool name="config_disableMenuKeyInLockScreen">false</bool>
|
||||||
|
|
||||||
|
<!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices -->
|
||||||
|
<bool name="config_hspa_data_distinguishable">false</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -272,6 +272,7 @@ public class StatusBarPolicy {
|
|||||||
private IBinder mDataIcon;
|
private IBinder mDataIcon;
|
||||||
private IconData mDataData;
|
private IconData mDataData;
|
||||||
private boolean mDataIconVisible;
|
private boolean mDataIconVisible;
|
||||||
|
private boolean mHspaDataDistinguishable;
|
||||||
|
|
||||||
// ringer volume
|
// ringer volume
|
||||||
private IBinder mVolumeIcon;
|
private IBinder mVolumeIcon;
|
||||||
@@ -517,6 +518,14 @@ public class StatusBarPolicy {
|
|||||||
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
|
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
|
||||||
filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
|
filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
|
||||||
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
|
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
|
||||||
|
|
||||||
|
// load config to determine if to distinguish Hspa data icon
|
||||||
|
try {
|
||||||
|
mHspaDataDistinguishable = mContext.getResources().getBoolean(
|
||||||
|
com.android.internal.R.bool.config_hspa_data_distinguishable);
|
||||||
|
} catch (Exception e) {
|
||||||
|
mHspaDataDistinguishable = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void installIcons(Context context, StatusBarService service) {
|
public static void installIcons(Context context, StatusBarService service) {
|
||||||
@@ -960,7 +969,11 @@ public class StatusBarPolicy {
|
|||||||
case TelephonyManager.NETWORK_TYPE_HSDPA:
|
case TelephonyManager.NETWORK_TYPE_HSDPA:
|
||||||
case TelephonyManager.NETWORK_TYPE_HSUPA:
|
case TelephonyManager.NETWORK_TYPE_HSUPA:
|
||||||
case TelephonyManager.NETWORK_TYPE_HSPA:
|
case TelephonyManager.NETWORK_TYPE_HSPA:
|
||||||
mDataIconList = sDataNetType_h;
|
if (mHspaDataDistinguishable) {
|
||||||
|
mDataIconList = sDataNetType_h;
|
||||||
|
} else {
|
||||||
|
mDataIconList = sDataNetType_3g;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TelephonyManager.NETWORK_TYPE_CDMA:
|
case TelephonyManager.NETWORK_TYPE_CDMA:
|
||||||
// display 1xRTT for IS95A/B
|
// display 1xRTT for IS95A/B
|
||||||
|
|||||||
Reference in New Issue
Block a user