forked from upstream-mirrors/OpenTracks
Removing no-longer-necessary methods from the platform adapters.
This commit is contained in:
@@ -19,7 +19,6 @@ import android.app.Notification;
|
|||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.HandlerThread;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A set of methods that may be implemented in a platform specific way.
|
* A set of methods that may be implemented in a platform specific way.
|
||||||
@@ -51,14 +50,6 @@ public interface ApiPlatformAdapter {
|
|||||||
void stopForeground(Service service, NotificationManager notificationManager,
|
void stopForeground(Service service, NotificationManager notificationManager,
|
||||||
int id);
|
int id);
|
||||||
|
|
||||||
/**
|
|
||||||
* Terminates the given handler thread.
|
|
||||||
*
|
|
||||||
* @param handlerThread the thread to be terminated.
|
|
||||||
* @return true whether the handler has been stopped or not.
|
|
||||||
*/
|
|
||||||
boolean stopHandlerThread(HandlerThread handlerThread);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies all changes done to the given preferences editor.
|
* Applies all changes done to the given preferences editor.
|
||||||
* Changes may or may not be applied immediately.
|
* Changes may or may not be applied immediately.
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
package com.google.android.apps.mytracks.util;
|
package com.google.android.apps.mytracks.util;
|
||||||
|
|
||||||
import static com.google.android.apps.mytracks.Constants.TAG;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
import android.os.HandlerThread;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@@ -70,12 +70,6 @@ public class CupcakePlatformAdapter implements ApiPlatformAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean stopHandlerThread(HandlerThread handlerThread) {
|
|
||||||
// Do nothing, as Cupcake doesn't provide quit().
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyPreferenceChanges(Editor editor) {
|
public void applyPreferenceChanges(Editor editor) {
|
||||||
editor.commit();
|
editor.commit();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import android.app.Notification;
|
|||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
import android.os.HandlerThread;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Eclair (API level 5) specific implementation of the
|
* The Eclair (API level 5) specific implementation of the
|
||||||
@@ -42,11 +41,6 @@ public class EclairPlatformAdapter implements ApiPlatformAdapter {
|
|||||||
service.stopForeground(id != -1);
|
service.stopForeground(id != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean stopHandlerThread(HandlerThread handlerThread) {
|
|
||||||
return handlerThread.quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyPreferenceChanges(Editor editor) {
|
public void applyPreferenceChanges(Editor editor) {
|
||||||
editor.commit();
|
editor.commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user