summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-11-30 00:56:57 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-30 00:56:57 -0800
commit349f3509f7335bbdef443a75afa36fb3c2d9552c (patch)
tree7e4b9aab7819938606b983879eb1a2c3204b9398
parentd9e12303d279654afe16319f948f93490cd1b4d5 (diff)
parent262cdfca7a0940735d3a08779e2d01bfdf639294 (diff)
downloadframeworks_base-349f3509f7335bbdef443a75afa36fb3c2d9552c.zip
frameworks_base-349f3509f7335bbdef443a75afa36fb3c2d9552c.tar.gz
frameworks_base-349f3509f7335bbdef443a75afa36fb3c2d9552c.tar.bz2
Merge "Correct SipService.isOpened() implementation." into gingerbread
-rw-r--r--voip/java/com/android/server/sip/SipService.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java
index f480fec..3af6e78 100644
--- a/voip/java/com/android/server/sip/SipService.java
+++ b/voip/java/com/android/server/sip/SipService.java
@@ -135,7 +135,7 @@ public final class SipService extends ISipService.Stub {
switch (state) {
case WifiManager.WIFI_STATE_ENABLED:
mWifiEnabled = true;
- if (anyOpened()) grabWifiLock();
+ if (anyOpenedToReceiveCalls()) grabWifiLock();
break;
case WifiManager.WIFI_STATE_DISABLED:
mWifiEnabled = false;
@@ -231,7 +231,7 @@ public final class SipService extends ISipService.Stub {
notifyProfileRemoved(group.getLocalProfile());
group.close();
- if (!anyOpened()) {
+ if (!anyOpenedToReceiveCalls()) {
releaseWifiLock();
mMyWakeLock.reset(); // in case there's leak
}
@@ -243,7 +243,7 @@ public final class SipService extends ISipService.Stub {
SipSessionGroupExt group = mSipGroups.get(localProfileUri);
if (group == null) return false;
if (isCallerCreatorOrRadio(group)) {
- return group.isOpened();
+ return true;
} else {
Log.w(TAG, "only creator or radio can query on the profile");
return false;
@@ -358,9 +358,9 @@ public final class SipService extends ISipService.Stub {
mContext.sendBroadcast(intent);
}
- private boolean anyOpened() {
+ private boolean anyOpenedToReceiveCalls() {
for (SipSessionGroupExt group : mSipGroups.values()) {
- if (group.isOpened()) return true;
+ if (group.isOpenedToReceiveCalls()) return true;
}
return false;
}
@@ -479,7 +479,7 @@ public final class SipService extends ISipService.Stub {
private class SipSessionGroupExt extends SipSessionAdapter {
private SipSessionGroup mSipGroup;
private PendingIntent mIncomingCallPendingIntent;
- private boolean mOpened;
+ private boolean mOpenedToReceiveCalls;
private AutoRegistrationProcess mAutoRegistration =
new AutoRegistrationProcess();
@@ -541,7 +541,7 @@ public final class SipService extends ISipService.Stub {
}
public void openToReceiveCalls() throws SipException {
- mOpened = true;
+ mOpenedToReceiveCalls = true;
if (mConnected) {
mSipGroup.openToReceiveCalls(this);
mAutoRegistration.start(mSipGroup);
@@ -555,9 +555,9 @@ public final class SipService extends ISipService.Stub {
mSipGroup.onConnectivityChanged();
if (connected) {
resetGroup(mLocalIp);
- if (mOpened) openToReceiveCalls();
+ if (mOpenedToReceiveCalls) openToReceiveCalls();
} else {
- // close mSipGroup but remember mOpened
+ // close mSipGroup but remember mOpenedToReceiveCalls
if (DEBUG) Log.d(TAG, " close auto reg temporarily: "
+ getUri() + ": " + mIncomingCallPendingIntent);
mSipGroup.close();
@@ -582,7 +582,7 @@ public final class SipService extends ISipService.Stub {
}
public void close() {
- mOpened = false;
+ mOpenedToReceiveCalls = false;
mSipGroup.close();
mAutoRegistration.stop();
if (DEBUG) Log.d(TAG, " close: " + getUri() + ": "
@@ -629,8 +629,8 @@ public final class SipService extends ISipService.Stub {
+ SipErrorCode.toString(errorCode) + ": " + message);
}
- public boolean isOpened() {
- return mOpened;
+ public boolean isOpenedToReceiveCalls() {
+ return mOpenedToReceiveCalls;
}
public boolean isRegistered() {