[android] #5075 - Adding deprecation notices

This commit is contained in:
Brad Leege
2016-05-25 16:05:14 -05:00
parent 842de0e859
commit e02a753de9
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.constants;
import android.content.Context;
import java.util.Locale;
/**
@@ -14,7 +15,9 @@ public class MapboxConstants {
/**
* Key used to store access token in AndroidManifest.xml
* @deprecated As of release 4.1.0, replaced by {@link com.mapbox.mapboxsdk.MapboxAccountManager#start(Context, String)}
*/
@Deprecated
public static final String KEY_META_DATA_MANIFEST = "com.mapbox.AccessToken";
/**

View File

@@ -11,7 +11,6 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.exceptions.InvalidAccessTokenException;
@@ -93,7 +92,10 @@ public final class MapFragment extends Fragment {
* @param context The {@link Context} of the {@link android.app.Activity} or {@link android.app.Fragment}.
* @return The Mapbox access token or null if not found.
* @see MapboxConstants#KEY_META_DATA_MANIFEST
*
* @deprecated As of release 4.1.0, replaced by {@link com.mapbox.mapboxsdk.MapboxAccountManager#start(Context, String)}
*/
@Deprecated
private String getToken(@NonNull Context context) {
try {
// read out AndroidManifest

View File

@@ -11,7 +11,6 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.exceptions.InvalidAccessTokenException;
@@ -102,7 +101,9 @@ public class SupportMapFragment extends Fragment {
* @param context The {@link Context} of the {@link android.app.Activity} or {@link android.app.Fragment}.
* @return The Mapbox access token or null if not found.
* @see MapboxConstants#KEY_META_DATA_MANIFEST
* @deprecated As of release 4.1.0, replaced by {@link com.mapbox.mapboxsdk.MapboxAccountManager#start(Context, String)}
*/
@Deprecated
private String getToken(@NonNull Context context) {
try {
// read out AndroidManifest
@@ -204,4 +205,4 @@ public class SupportMapFragment extends Fragment {
public void getMapAsync(@NonNull final OnMapReadyCallback onMapReadyCallback) {
mOnMapReadyCallback = onMapReadyCallback;
}
}
}