mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
P25 and Airspy work in progress
Updated p25 decoder state to better track calls and call detects from a trunked channel Fixed issue with false detects on LDU2 encrypted call messages Fixed Airspy channel allocation ... will allocate channels across the entire bandwidth, minus 50 kHz on either end, and will not adjust the center frequency if it's not needed. Fixed traffic channel teardown -- traffic channels are immediately removed now, without a fade delay. AudioMetadata - updated flag is now reset upon copying the metadata
This commit is contained in:
@@ -376,61 +376,64 @@ public class SettingsManager
|
||||
*/
|
||||
public ImageIcon getImageIcon( String name, int height )
|
||||
{
|
||||
String mergedName = name + height;
|
||||
|
||||
if( mResizedIcons.containsKey( mergedName ) )
|
||||
if( name != null )
|
||||
{
|
||||
return mResizedIcons.get( mergedName );
|
||||
}
|
||||
|
||||
MapIcon mapIcon = mIcons.get( name );
|
||||
|
||||
if( mapIcon != null )
|
||||
{
|
||||
if( mapIcon.getImageIcon().getIconHeight() > height )
|
||||
String mergedName = name + height;
|
||||
|
||||
if( mResizedIcons.containsKey( mergedName ) )
|
||||
{
|
||||
ImageIcon scaled = getScaledIcon( mapIcon.getImageIcon(), height );
|
||||
|
||||
mResizedIcons.put( mergedName, scaled );
|
||||
|
||||
return scaled;
|
||||
return mResizedIcons.get( mergedName );
|
||||
}
|
||||
else
|
||||
{
|
||||
mResizedIcons.put( mergedName, mapIcon.getImageIcon() );
|
||||
}
|
||||
}
|
||||
|
||||
MapIcon mapIcon = mIcons.get( name );
|
||||
|
||||
/* Use the default Icon */
|
||||
String mergedDefault = mCurrentDefaultIconName + height;
|
||||
|
||||
if( mResizedIcons.containsKey( mergedDefault ) )
|
||||
{
|
||||
return mResizedIcons.get( mergedDefault );
|
||||
}
|
||||
else
|
||||
{
|
||||
MapIcon defaultIcon = mIcons.get( mCurrentDefaultIconName );
|
||||
|
||||
if( defaultIcon != null )
|
||||
if( mapIcon != null )
|
||||
{
|
||||
if( defaultIcon.getImageIcon().getIconHeight() > height )
|
||||
if( mapIcon.getImageIcon().getIconHeight() > height )
|
||||
{
|
||||
ImageIcon scaledDefault = getScaledIcon( defaultIcon.getImageIcon(), height );
|
||||
mResizedIcons.put( mergedDefault, scaledDefault );
|
||||
return scaledDefault;
|
||||
ImageIcon scaled = getScaledIcon( mapIcon.getImageIcon(), height );
|
||||
|
||||
mResizedIcons.put( mergedName, scaled );
|
||||
|
||||
return scaled;
|
||||
}
|
||||
else
|
||||
{
|
||||
mResizedIcons.put( mergedDefault, defaultIcon.getImageIcon() );
|
||||
return defaultIcon.getImageIcon();
|
||||
mResizedIcons.put( mergedName, mapIcon.getImageIcon() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Something happened ... the above should always return an icon */
|
||||
mLog.error( "SettingsManager - couldn't return an icon named [" +
|
||||
name + "] of heigh [" + height + "]" );
|
||||
/* Use the default Icon */
|
||||
String mergedDefault = mCurrentDefaultIconName + height;
|
||||
|
||||
if( mResizedIcons.containsKey( mergedDefault ) )
|
||||
{
|
||||
return mResizedIcons.get( mergedDefault );
|
||||
}
|
||||
else
|
||||
{
|
||||
MapIcon defaultIcon = mIcons.get( mCurrentDefaultIconName );
|
||||
|
||||
if( defaultIcon != null )
|
||||
{
|
||||
if( defaultIcon.getImageIcon().getIconHeight() > height )
|
||||
{
|
||||
ImageIcon scaledDefault = getScaledIcon( defaultIcon.getImageIcon(), height );
|
||||
mResizedIcons.put( mergedDefault, scaledDefault );
|
||||
return scaledDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
mResizedIcons.put( mergedDefault, defaultIcon.getImageIcon() );
|
||||
return defaultIcon.getImageIcon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Something happened ... the above should always return an icon */
|
||||
mLog.error( "SettingsManager - couldn't return an icon named [" +
|
||||
name + "] of heigh [" + height + "]" );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user