summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/widget/EdgeGlow.java2
-rw-r--r--services/java/com/android/server/ConnectivityService.java29
-rwxr-xr-xservices/jni/com_android_server_location_GpsLocationProvider.cpp41
-rw-r--r--telephony/java/com/android/internal/telephony/CallManager.java2
-rw-r--r--wifi/java/android/net/wifi/WifiStateTracker.java24
5 files changed, 51 insertions, 47 deletions
diff --git a/core/java/android/widget/EdgeGlow.java b/core/java/android/widget/EdgeGlow.java
index 8d1446212b03..c1a389ae1360 100644
--- a/core/java/android/widget/EdgeGlow.java
+++ b/core/java/android/widget/EdgeGlow.java
@@ -38,7 +38,7 @@ public class EdgeGlow {
// 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 8114be96d36d..a663c3a50ebb 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1038,10 +1038,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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 @@ public class ConnectivityService extends IConnectivityManager.Stub {
newNet = null; // not officially avail.. try anyway, but
// report no failover
}
+ } else {
+ Slog.e(TAG, "Network failover failing.");
}
}
@@ -1131,16 +1131,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp
index b9ceaa1befb6..b312fb19aa26 100755
--- a/services/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -326,29 +326,45 @@ static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject o
static void android_location_GpsLocationProvider_cleanup(JNIEnv* env, jobject obj)
{
- sGpsInterface->cleanup();
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ interface->cleanup();
}
static jboolean android_location_GpsLocationProvider_set_position_mode(JNIEnv* env, jobject obj,
jint mode, jint recurrence, jint min_interval, jint preferred_accuracy, jint preferred_time)
{
- return (sGpsInterface->set_position_mode(mode, recurrence, min_interval, preferred_accuracy,
- preferred_time) == 0);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ return (interface->set_position_mode(mode, recurrence, min_interval, preferred_accuracy,
+ preferred_time) == 0);
+ else
+ return false;
}
static jboolean android_location_GpsLocationProvider_start(JNIEnv* env, jobject obj)
{
- return (sGpsInterface->start() == 0);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ return (interface->start() == 0);
+ else
+ return false;
}
static jboolean android_location_GpsLocationProvider_stop(JNIEnv* env, jobject obj)
{
- return (sGpsInterface->stop() == 0);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ return (interface->stop() == 0);
+ else
+ return false;
}
static void android_location_GpsLocationProvider_delete_aiding_data(JNIEnv* env, jobject obj, jint flags)
{
- sGpsInterface->delete_aiding_data(flags);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ interface->delete_aiding_data(flags);
}
static jint android_location_GpsLocationProvider_read_sv_status(JNIEnv* env, jobject obj,
@@ -456,19 +472,26 @@ static jint android_location_GpsLocationProvider_read_nmea(JNIEnv* env, jobject
static void android_location_GpsLocationProvider_inject_time(JNIEnv* env, jobject obj,
jlong time, jlong timeReference, jint uncertainty)
{
- sGpsInterface->inject_time(time, timeReference, uncertainty);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ interface->inject_time(time, timeReference, uncertainty);
}
static void android_location_GpsLocationProvider_inject_location(JNIEnv* env, jobject obj,
jdouble latitude, jdouble longitude, jfloat accuracy)
{
- sGpsInterface->inject_location(latitude, longitude, accuracy);
+ const GpsInterface* interface = GetGpsInterface();
+ if (interface)
+ interface->inject_location(latitude, longitude, accuracy);
}
static jboolean android_location_GpsLocationProvider_supports_xtra(JNIEnv* env, jobject obj)
{
if (!sGpsXtraInterface) {
- sGpsXtraInterface = (const GpsXtraInterface*)sGpsInterface->get_extension(GPS_XTRA_INTERFACE);
+ const GpsInterface* interface = GetGpsInterface();
+ if (!interface)
+ return false;
+ sGpsXtraInterface = (const GpsXtraInterface*)interface->get_extension(GPS_XTRA_INTERFACE);
if (sGpsXtraInterface) {
int result = sGpsXtraInterface->init(&sGpsXtraCallbacks);
if (result) {
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index 7a026fa9a977..b09df82d141a 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -925,7 +925,7 @@ public final class CallManager {
}
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 9d27bde124c7..281077c74b6f 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -862,15 +862,7 @@ public class WifiStateTracker extends NetworkStateTracker {
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 @@ public class WifiStateTracker extends NetworkStateTracker {
*/
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 @@ public class WifiStateTracker extends NetworkStateTracker {
}
/**
- * 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