am 79ff03a8: Merge change I3ae1fb19 into eclair-mr2
Merge commit '79ff03a84b8f6aa9fc95fba728a131e9c88d1b47' into eclair-mr2-plus-aosp * commit '79ff03a84b8f6aa9fc95fba728a131e9c88d1b47': Increase the default wake lock timeout.
This commit is contained in:
@@ -208,7 +208,12 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
private static final boolean DBG = false;
|
private static final boolean DBG = false;
|
||||||
static final boolean RILJ_LOGD = Config.LOGD;
|
static final boolean RILJ_LOGD = Config.LOGD;
|
||||||
static final boolean RILJ_LOGV = DBG ? Config.LOGD : Config.LOGV;
|
static final boolean RILJ_LOGV = DBG ? Config.LOGD : Config.LOGV;
|
||||||
static int WAKE_LOCK_TIMEOUT = 5000;
|
|
||||||
|
/**
|
||||||
|
* Wake lock timeout should be longer than the longest timeout in
|
||||||
|
* the vendor ril.
|
||||||
|
*/
|
||||||
|
private static final int DEFAULT_WAKE_LOCK_TIMEOUT = 30000;
|
||||||
|
|
||||||
//***** Instance Variables
|
//***** Instance Variables
|
||||||
|
|
||||||
@@ -219,6 +224,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
RILReceiver mReceiver;
|
RILReceiver mReceiver;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
WakeLock mWakeLock;
|
WakeLock mWakeLock;
|
||||||
|
int mWakeLockTimeout;
|
||||||
int mRequestMessagesPending;
|
int mRequestMessagesPending;
|
||||||
|
|
||||||
// Is this the first radio state change?
|
// Is this the first radio state change?
|
||||||
@@ -603,6 +609,8 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
|
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
|
||||||
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG);
|
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG);
|
||||||
mWakeLock.setReferenceCounted(false);
|
mWakeLock.setReferenceCounted(false);
|
||||||
|
mWakeLockTimeout = SystemProperties.getInt(TelephonyProperties.PROPERTY_WAKE_LOCK_TIMEOUT,
|
||||||
|
DEFAULT_WAKE_LOCK_TIMEOUT);
|
||||||
mRequestMessagesPending = 0;
|
mRequestMessagesPending = 0;
|
||||||
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
@@ -1996,7 +2004,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
|
|
||||||
mSender.removeMessages(EVENT_WAKE_LOCK_TIMEOUT);
|
mSender.removeMessages(EVENT_WAKE_LOCK_TIMEOUT);
|
||||||
Message msg = mSender.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT);
|
Message msg = mSender.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT);
|
||||||
mSender.sendMessageDelayed(msg, WAKE_LOCK_TIMEOUT);
|
mSender.sendMessageDelayed(msg, mWakeLockTimeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,4 +136,9 @@ public interface TelephonyProperties
|
|||||||
* monotonically, regardless of reboots.
|
* monotonically, regardless of reboots.
|
||||||
*/
|
*/
|
||||||
static final String PROPERTY_CDMA_MSG_ID = "persist.radio.cdma.msgid";
|
static final String PROPERTY_CDMA_MSG_ID = "persist.radio.cdma.msgid";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Property to override DEFAULT_WAKE_LOCK_TIMEOUT
|
||||||
|
*/
|
||||||
|
static final String PROPERTY_WAKE_LOCK_TIMEOUT = "ro.ril.wake_lock_timeout";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user