[android] #5075 - Adding deprecation notices
This commit is contained in:
@@ -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";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user