diff options
Diffstat (limited to 'services')
4 files changed, 16 insertions, 5 deletions
diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java index ab20208..99cb2c8 100644 --- a/services/java/com/android/server/am/BatteryStatsService.java +++ b/services/java/com/android/server/am/BatteryStatsService.java @@ -330,6 +330,13 @@ public final class BatteryStatsService extends IBatteryStats.Stub { synchronized (mStats) { mBluetoothPendingStats = false; mStats.noteBluetoothOffLocked(); + mStats.setBtHeadset(null); + } + + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + if (adapter != null && mBluetoothHeadset != null) { + adapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset); + mBluetoothHeadset = null; } } diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java index 22c52f4..cba2db2 100644 --- a/services/java/com/android/server/location/GpsLocationProvider.java +++ b/services/java/com/android/server/location/GpsLocationProvider.java @@ -1471,7 +1471,7 @@ public class GpsLocationProvider implements LocationProviderInterface { type = AGPS_REF_LOCATION_TYPE_GSM_CELLID; } native_agps_set_ref_location_cellid(type, mcc, mnc, - gsm_cell.getLac(), gsm_cell.getCid()); + gsm_cell.getLac(), gsm_cell.getPsc(), gsm_cell.getCid()); } else { Log.e(TAG,"Error getting cell location info."); } @@ -1642,7 +1642,7 @@ public class GpsLocationProvider implements LocationProviderInterface { // AGPS ril suport private native void native_agps_set_ref_location_cellid(int type, int mcc, int mnc, - int lac, int cid); + int lac, int psc, int cid); private native void native_agps_set_id(int type, String setid); private native void native_update_network_state(boolean connected, int type, diff --git a/services/java/com/android/server/power/ShutdownThread.java b/services/java/com/android/server/power/ShutdownThread.java index c2c678a0..9c10c9d 100644 --- a/services/java/com/android/server/power/ShutdownThread.java +++ b/services/java/com/android/server/power/ShutdownThread.java @@ -156,7 +156,7 @@ public final class ShutdownThread extends Thread { // See if the advanced reboot menu is enabled (only if primary user) and check the keyguard state boolean advancedReboot = isPrimary ? advancedRebootEnabled(context) : false; KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); - boolean locked = km.inKeyguardRestrictedInputMode(); + boolean locked = km.inKeyguardRestrictedInputMode() && km.isKeyguardSecure(); if (advancedReboot && !locked) { // Include options in power menu for rebooting into recovery or bootloader diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp index f2ec1b3..4285ddf 100644 --- a/services/jni/com_android_server_location_GpsLocationProvider.cpp +++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp @@ -375,7 +375,7 @@ static jint android_location_GpsLocationProvider_read_sv_status(JNIEnv* env, job } static void android_location_GpsLocationProvider_agps_set_reference_location_cellid(JNIEnv* env, - jobject obj, jint type, jint mcc, jint mnc, jint lac, jint cid) + jobject obj, jint type, jint mcc, jint mnc, jint lac, jint psc, jint cid) { AGpsRefLocation location; @@ -388,9 +388,13 @@ static void android_location_GpsLocationProvider_agps_set_reference_location_cel case AGPS_REF_LOCATION_TYPE_GSM_CELLID: case AGPS_REF_LOCATION_TYPE_UMTS_CELLID: location.type = type; + location.u.cellID.type = type; location.u.cellID.mcc = mcc; location.u.cellID.mnc = mnc; location.u.cellID.lac = lac; +#ifdef AGPS_USE_PSC + location.u.cellID.psc = psc; +#endif location.u.cellID.cid = cid; break; default: @@ -601,7 +605,7 @@ static JNINativeMethod sMethods[] = { {"native_agps_data_conn_closed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_closed}, {"native_agps_data_conn_failed", "()V", (void*)android_location_GpsLocationProvider_agps_data_conn_failed}, {"native_agps_set_id","(ILjava/lang/String;)V",(void*)android_location_GpsLocationProvider_agps_set_id}, - {"native_agps_set_ref_location_cellid","(IIIII)V",(void*)android_location_GpsLocationProvider_agps_set_reference_location_cellid}, + {"native_agps_set_ref_location_cellid","(IIIIII)V",(void*)android_location_GpsLocationProvider_agps_set_reference_location_cellid}, {"native_set_agps_server", "(ILjava/lang/String;I)V", (void*)android_location_GpsLocationProvider_set_agps_server}, {"native_send_ni_response", "(II)V", (void*)android_location_GpsLocationProvider_send_ni_response}, {"native_agps_ni_message", "([BI)V", (void *)android_location_GpsLocationProvider_agps_send_ni_message}, |