Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_services_Telephony
Commits
209cb1e4
Commit
209cb1e4
authored
9 years ago
by
Tyler Gunn
Committed by
Android (Google) Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge "Fix issue where host shows up as a conference participant." into mnc-dr-dev
parents
d30a7385
26727ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
src/com/android/services/telephony/ImsConference.java
src/com/android/services/telephony/ImsConference.java
+17
-1
No files found.
src/com/android/services/telephony/ImsConference.java
View file @
209cb1e4
...
...
@@ -28,6 +28,7 @@ import android.telecom.Log;
import
android.telecom.PhoneAccountHandle
;
import
android.telecom.StatusHints
;
import
android.telecom.VideoProfile
;
import
android.telephony.PhoneNumberUtils
;
import
com.android.internal.telephony.Call
;
import
com.android.internal.telephony.CallStateException
;
...
...
@@ -706,9 +707,16 @@ public class ImsConference extends Conference {
private
boolean
isParticipantHost
(
Uri
hostHandle
,
Uri
handle
)
{
// If host and participant handles are the same, bail early.
if
(
Objects
.
equals
(
hostHandle
,
handle
))
{
Log
.
v
(
this
,
"isParticipantHost(Y) : uris equal"
);
return
true
;
}
// If there is no host handle or not participant handle, bail early.
if
(
hostHandle
==
null
||
handle
==
null
)
{
Log
.
v
(
this
,
"isParticipantHost(N) : host or participant uri null"
);
return
false
;
}
// Conference event package participants are identified using SIP URIs (see RFC3261).
// A valid SIP uri has the format: sip:user:password@host:port;uri-parameters?headers
// Per RFC3261, the "user" can be a telephone number.
...
...
@@ -726,6 +734,7 @@ public class ImsConference extends Conference {
String
numberParts
[]
=
number
.
split
(
"[@;:]"
);
if
(
numberParts
.
length
==
0
)
{
Log
.
v
(
this
,
"isParticipantHost(N) : no number in participant handle"
);
return
false
;
}
number
=
numberParts
[
0
];
...
...
@@ -734,7 +743,14 @@ public class ImsConference extends Conference {
// number.
String
hostNumber
=
hostHandle
.
getSchemeSpecificPart
();
return
Objects
.
equals
(
hostNumber
,
number
);
// Use a loose comparison of the phone numbers. This ensures that numbers that differ by
// special characters are counted as equal.
// E.g. +16505551212 would be the same as 16505551212
boolean
isHost
=
PhoneNumberUtils
.
compare
(
hostNumber
,
number
);
Log
.
v
(
this
,
"isParticipantHost(%s) : host: %s, participant %s"
,
(
isHost
?
"Y"
:
"N"
),
Log
.
pii
(
hostNumber
),
Log
.
pii
(
number
));
return
isHost
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment