From 5424c8dcacf1c227fe7deb0185510614122ab447 Mon Sep 17 00:00:00 2001 From: Chung-yih Wang Date: Wed, 25 Aug 2010 19:02:18 +0800 Subject: Add dynamic uid info for tracking the sip service usage. Change-Id: Ibc340401b63799326b08aee6eba602a3e753b13f --- voip/java/android/net/sip/SipProfile.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'voip') diff --git a/voip/java/android/net/sip/SipProfile.java b/voip/java/android/net/sip/SipProfile.java index ec8d0ed..6c99141 100644 --- a/voip/java/android/net/sip/SipProfile.java +++ b/voip/java/android/net/sip/SipProfile.java @@ -47,6 +47,7 @@ public class SipProfile implements Parcelable, Serializable, Cloneable { private boolean mSendKeepAlive = false; private boolean mAutoRegistration = true; private boolean mAllowOutgoingCall = false; + private int mCallingUid = -1; /** @hide */ public static final Parcelable.Creator CREATOR = @@ -293,6 +294,7 @@ public class SipProfile implements Parcelable, Serializable, Cloneable { mSendKeepAlive = (in.readInt() == 0) ? false : true; mAutoRegistration = (in.readInt() == 0) ? false : true; mAllowOutgoingCall = (in.readInt() == 0) ? false : true; + mCallingUid = in.readInt(); } /** @hide */ @@ -306,6 +308,7 @@ public class SipProfile implements Parcelable, Serializable, Cloneable { out.writeInt(mSendKeepAlive ? 1 : 0); out.writeInt(mAutoRegistration ? 1 : 0); out.writeInt(mAllowOutgoingCall ? 1 : 0); + out.writeInt(mCallingUid); } /** @hide */ @@ -437,4 +440,20 @@ public class SipProfile implements Parcelable, Serializable, Cloneable { public boolean isOutgoingCallAllowed() { return mAllowOutgoingCall; } + + /** + * Sets the calling process's Uid in the sip service. + * @hide + */ + public void setCallingUid(int uid) { + mCallingUid = uid; + } + + /** + * Gets the calling process's Uid in the sip settings. + * @hide + */ + public int getCallingUid() { + return mCallingUid; + } } -- cgit v1.1