Added the LOCATION_STATUS using IntDef.
This commit is contained in:
@@ -22,6 +22,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
import android.text.format.Time;
|
||||
@@ -40,6 +41,8 @@ import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Vector;
|
||||
@@ -67,6 +70,17 @@ public class SunshineSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
private static final int INDEX_MIN_TEMP = 2;
|
||||
private static final int INDEX_SHORT_DESC = 3;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({LOCATION_STATUS_OK, LOCATION_STATUS_SERVER_DOWN, LOCATION_STATUS_SERVER_INVALID, LOCATION_STATUS_UNKNOWN})
|
||||
public @interface LocationStatus {}
|
||||
|
||||
public static final int LOCATION_STATUS_OK = 0;
|
||||
public static final int LOCATION_STATUS_SERVER_DOWN = 1;
|
||||
public static final int
|
||||
LOCATION_STATUS_SERVER_INVALID = 2;
|
||||
public static final int
|
||||
LOCATION_STATUS_UNKNOWN = 3;
|
||||
|
||||
public SunshineSyncAdapter(Context context, boolean autoInitialize) {
|
||||
super(context, autoInitialize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user