forked from organicmaps/organicmaps
[android] Remove LocationListener.Simple()
Add default methods instead. Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
parent
03f32574f1
commit
6fc67663a7
4 changed files with 7 additions and 13 deletions
|
@ -94,7 +94,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||
new Factory.KmzKmlProcessor(this),
|
||||
};
|
||||
|
||||
private final LocationListener mLocationListener = new LocationListener.Simple()
|
||||
private final LocationListener mLocationListener = new LocationListener()
|
||||
{
|
||||
@Override
|
||||
public void onLocationUpdated(Location location)
|
||||
|
|
|
@ -6,16 +6,10 @@ import androidx.annotation.NonNull;
|
|||
|
||||
public interface LocationListener
|
||||
{
|
||||
class Simple implements LocationListener
|
||||
{
|
||||
@Override
|
||||
public void onLocationUpdated(@NonNull Location location) {}
|
||||
|
||||
@Override
|
||||
public void onCompassUpdated(double north) {}
|
||||
}
|
||||
|
||||
void onLocationUpdated(@NonNull Location location);
|
||||
|
||||
void onCompassUpdated(double north);
|
||||
default void onCompassUpdated(double north)
|
||||
{
|
||||
// No op.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class NavigationService extends Service
|
|||
private boolean mChangingConfiguration = false;
|
||||
|
||||
@NonNull
|
||||
private final LocationListener mLocationListener = new LocationListener.Simple()
|
||||
private final LocationListener mLocationListener = new LocationListener()
|
||||
{
|
||||
@Override
|
||||
public void onLocationUpdated(Location location)
|
||||
|
|
|
@ -168,7 +168,7 @@ public class SearchFragment extends BaseMwmFragment
|
|||
private String mInitialLocale;
|
||||
private boolean mInitialSearchOnMap = false;
|
||||
|
||||
private final LocationListener mLocationListener = new LocationListener.Simple()
|
||||
private final LocationListener mLocationListener = new LocationListener()
|
||||
{
|
||||
@Override
|
||||
public void onLocationUpdated(Location location)
|
||||
|
|
Loading…
Add table
Reference in a new issue