Merge "GPS: More HAL initialization cleanup" into gingerbread
diff --git a/core/java/android/inputmethodservice/ExtractEditText.java b/core/java/android/inputmethodservice/ExtractEditText.java
index 8a52e40..3447e76c 100644
--- a/core/java/android/inputmethodservice/ExtractEditText.java
+++ b/core/java/android/inputmethodservice/ExtractEditText.java
@@ -18,7 +18,6 @@
import android.content.Context;
import android.util.AttributeSet;
-import android.view.ContextMenu;
import android.view.inputmethod.ExtractedText;
import android.widget.EditText;
@@ -29,7 +28,6 @@
public class ExtractEditText extends EditText {
private InputMethodService mIME;
private int mSettingExtractedText;
- private boolean mContextMenuShouldBeHandledBySuper = false;
public ExtractEditText(Context context) {
super(context, null);
@@ -99,19 +97,13 @@
return false;
}
- @Override
- protected void onCreateContextMenu(ContextMenu menu) {
- super.onCreateContextMenu(menu);
- mContextMenuShouldBeHandledBySuper = true;
- }
-
@Override public boolean onTextContextMenuItem(int id) {
- if (mIME != null && !mContextMenuShouldBeHandledBySuper) {
+ // Horrible hack: select word option has to be handled by original view to work.
+ if (mIME != null && id != android.R.id.startSelectingText) {
if (mIME.onExtractTextContextMenuItem(id)) {
return true;
}
}
- mContextMenuShouldBeHandledBySuper = false;
return super.onTextContextMenuItem(id);
}
diff --git a/core/java/android/widget/EdgeGlow.java b/core/java/android/widget/EdgeGlow.java
index 8d14462..c1a389a 100644
--- a/core/java/android/widget/EdgeGlow.java
+++ b/core/java/android/widget/EdgeGlow.java
@@ -38,7 +38,7 @@
// Time it will take for a pulled glow to decay to partial strength before release
private static final int PULL_DECAY_TIME = 10000;
- private static final float MAX_ALPHA = 1.f;
+ private static final float MAX_ALPHA = 0.8f;
private static final float HELD_EDGE_ALPHA = 0.7f;
private static final float HELD_EDGE_SCALE_Y = 0.5f;
private static final float HELD_GLOW_ALPHA = 0.5f;
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 8114be9..a663c3a 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1038,10 +1038,8 @@
if (mNetAttributes[checkType] == null) continue;
if (mNetAttributes[checkType].mRadio == ConnectivityManager.TYPE_MOBILE &&
noMobileData) {
- if (DBG) {
- Slog.d(TAG, "not failing over to mobile type " + checkType +
- " because Mobile Data Disabled");
- }
+ Slog.e(TAG, "not failing over to mobile type " + checkType +
+ " because Mobile Data Disabled");
continue;
}
if (mNetAttributes[checkType].isDefault()) {
@@ -1089,6 +1087,8 @@
newNet = null; // not officially avail.. try anyway, but
// report no failover
}
+ } else {
+ Slog.e(TAG, "Network failover failing.");
}
}
@@ -1131,16 +1131,13 @@
String reason = info.getReason();
String extraInfo = info.getExtraInfo();
- if (DBG) {
- String reasonText;
- if (reason == null) {
- reasonText = ".";
- } else {
- reasonText = " (" + reason + ").";
- }
- Slog.v(TAG, "Attempt to connect to " + info.getTypeName() +
- " failed" + reasonText);
+ String reasonText;
+ if (reason == null) {
+ reasonText = ".";
+ } else {
+ reasonText = " (" + reason + ").";
}
+ Slog.e(TAG, "Attempt to connect to " + info.getTypeName() + " failed" + reasonText);
Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info);
@@ -1164,9 +1161,9 @@
if (newNet != null) {
NetworkInfo switchTo = newNet.getNetworkInfo();
if (!switchTo.isConnected()) {
- // if the other net is connected they've already reset this and perhaps even gotten
- // a positive report we don't want to overwrite, but if not we need to clear this now
- // to turn our cellular sig strength white
+ // if the other net is connected they've already reset this and perhaps
+ // even gotten a positive report we don't want to overwrite, but if not
+ // we need to clear this now to turn our cellular sig strength white
mDefaultInetConditionPublished = 0;
}
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index 7a026fa..b09df82 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -925,7 +925,7 @@
}
if (hasActiveFgCall()) {
- getActiveFgCall().getPhone().sendDtmf(c);
+ getActiveFgCall().getPhone().startDtmf(c);
result = true;
}
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 9d27bde..281077c 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -862,15 +862,7 @@
mIsAnyNetworkDisabled.set(false);
requestConnectionInfo();
SupplicantState supplState = mWifiInfo.getSupplicantState();
- /**
- * The MAC address isn't going to change, so just request it
- * once here.
- */
- String macaddr = getMacAddress();
- if (macaddr != null) {
- mWifiInfo.setMacAddress(macaddr);
- }
if (LOCAL_LOGD) Log.v(TAG, "Connection to supplicant established, state=" +
supplState);
// Wi-Fi supplicant connection state changed:
@@ -1289,6 +1281,10 @@
*/
setNumAllowedChannels();
synchronized (this) {
+ String macaddr = WifiNative.getMacAddressCommand();
+ if (macaddr != null) {
+ mWifiInfo.setMacAddress(macaddr);
+ }
if (mRunState == RUN_STATE_STARTING) {
mRunState = RUN_STATE_RUNNING;
if (!mIsScanOnly) {
@@ -2010,18 +2006,6 @@
}
/**
- * Get MAC address of radio
- *
- * @return MAC address, null on failure
- */
- public synchronized String getMacAddress() {
- if (mWifiState.get() != WIFI_STATE_ENABLED || isDriverStopped()) {
- return null;
- }
- return WifiNative.getMacAddressCommand();
- }
-
- /**
* Start driver
*
* @return {@code true} if the operation succeeds, {@code false} otherwise