mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
#115 patch group alias - resolves issue where wildcard aliases were being matched against a temporary patch group id and removed from the alias list for the lifespan of the patch group. General cleanup of the rollup methods for the patch group alias. Adds a new method to alias list that allows alias lookup from a tgid while excluding wildcard talkgroups.
This commit is contained in:
@@ -579,8 +579,12 @@ public class AliasList implements Listener<AliasEvent>
|
||||
|
||||
/**
|
||||
* Lookup alias by talkgroup
|
||||
*
|
||||
* @param tgid to use when searching for an alias
|
||||
* @param includeWildcards true if you want to additionally search for a matching alias that contains wildcard(s)
|
||||
* when there is not a direct match to the TGID.
|
||||
*/
|
||||
public Alias getTalkgroupAlias(String tgid)
|
||||
public Alias getTalkgroupAlias(String tgid, boolean includeWildcards)
|
||||
{
|
||||
Alias alias = null;
|
||||
|
||||
@@ -588,7 +592,7 @@ public class AliasList implements Listener<AliasEvent>
|
||||
{
|
||||
alias = mTalkgroup.get(tgid);
|
||||
|
||||
if (alias == null)
|
||||
if (alias == null && includeWildcards)
|
||||
{
|
||||
String wildcard = getWildcardMatch(tgid, mTalkgroupWildcards);
|
||||
|
||||
@@ -603,8 +607,16 @@ public class AliasList implements Listener<AliasEvent>
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias list name
|
||||
* Lookup alias by talkgroup. Defaults to matching to wildcard talkgroups.
|
||||
*/
|
||||
public Alias getTalkgroupAlias(String tgid)
|
||||
{
|
||||
return getTalkgroupAlias(tgid, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias list name
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return mName;
|
||||
|
||||
Reference in New Issue
Block a user