mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 00:37:59 -06:00
Add more types of fields, F-droid fixes
This commit is contained in:
@@ -8,8 +8,11 @@ import android.widget.EditText;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.ridgebotics.ridgescout.types.input.checkboxType;
|
||||
import com.ridgebotics.ridgescout.types.input.dropdownType;
|
||||
import com.ridgebotics.ridgescout.types.input.fieldposType;
|
||||
import com.ridgebotics.ridgescout.types.input.inputType;
|
||||
import com.ridgebotics.ridgescout.types.input.numberType;
|
||||
import com.ridgebotics.ridgescout.types.input.sliderType;
|
||||
import com.ridgebotics.ridgescout.types.input.tallyType;
|
||||
import com.ridgebotics.ridgescout.types.input.textType;
|
||||
@@ -19,7 +22,8 @@ public class FieldEditorHelper {
|
||||
private enum parameterTypeEnum {
|
||||
paramNumber,
|
||||
paramString,
|
||||
paramStringArray
|
||||
paramStringArray,
|
||||
paramNumberArray
|
||||
}
|
||||
|
||||
public static class parameterType {
|
||||
@@ -54,6 +58,15 @@ public class FieldEditorHelper {
|
||||
}
|
||||
}
|
||||
|
||||
// public static class paramNumberArray extends parameterType{
|
||||
// public int[] val;
|
||||
// public paramNumberArray(String name, int[] val){
|
||||
// this.name = name + " (Number array)";
|
||||
// this.val = val;
|
||||
// this.id = parameterTypeEnum.paramNumberArray;
|
||||
// }
|
||||
// }
|
||||
|
||||
public static final parameterType[] defaultSliderParams = new parameterType[]{
|
||||
new paramNumber("Min", 0),
|
||||
new paramNumber("Max", 10),
|
||||
@@ -69,6 +82,16 @@ public class FieldEditorHelper {
|
||||
public static final parameterType[] defaultTallyParams = new parameterType[]{
|
||||
new paramNumber("Default Value", 0)
|
||||
};
|
||||
public static final parameterType[] defaultNumberParams = new parameterType[]{
|
||||
new paramNumber("Default Value", 0)
|
||||
};
|
||||
public static final parameterType[] defaultCheckboxParam = new parameterType[]{
|
||||
new paramNumber("Default Value ( 1 or 0 )", 0)
|
||||
};
|
||||
public static final parameterType[] defaultFieldPosParam = new parameterType[]{
|
||||
new paramNumber("Default X", 0),
|
||||
new paramNumber("Default Y", 0)
|
||||
};
|
||||
|
||||
|
||||
private static parameterType[] getSliderParams(sliderType s){
|
||||
@@ -98,6 +121,25 @@ public class FieldEditorHelper {
|
||||
};
|
||||
}
|
||||
|
||||
private static parameterType[] getNumberParams(numberType s){
|
||||
return new parameterType[]{
|
||||
new paramNumber("Default Value", (int) s.default_value)
|
||||
};
|
||||
}
|
||||
|
||||
private static parameterType[] getCheckboxParam(checkboxType s){
|
||||
return new parameterType[]{
|
||||
new paramNumber("Default Value ( 1 or 0 )", (int) s.default_value)
|
||||
};
|
||||
}
|
||||
|
||||
private static parameterType[] getFieldPosParam(fieldposType s){
|
||||
return new parameterType[]{
|
||||
new paramNumber("Default X", ((int[]) s.default_value)[0]),
|
||||
new paramNumber("Default Y", ((int[]) s.default_value)[1])
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void setSliderParams(sliderType s, parameterType[] types){
|
||||
@@ -119,6 +161,22 @@ public class FieldEditorHelper {
|
||||
s.default_value = ((paramNumber) types[0]).val;
|
||||
}
|
||||
|
||||
public static void setNumberParams(numberType s, parameterType[] types){
|
||||
s.default_value = ((paramNumber) types[0]).val;
|
||||
}
|
||||
|
||||
public static void setCheckboxParam(checkboxType s, parameterType[] types){
|
||||
s.default_value = ((paramNumber) types[0]).val;
|
||||
}
|
||||
|
||||
public static void setFieldPosParam(fieldposType s, parameterType[] types){
|
||||
s.default_value = new int[]{
|
||||
((paramNumber) types[0]).val,
|
||||
((paramNumber) types[1]).val
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private static void setInputParameter(inputType t, parameterType[] types){
|
||||
switch (t.getInputType()){
|
||||
case TALLY:
|
||||
@@ -133,6 +191,15 @@ public class FieldEditorHelper {
|
||||
case NOTES_INPUT:
|
||||
setTextParams((textType) t, types);
|
||||
break;
|
||||
case NUMBER:
|
||||
setNumberParams((numberType) t, types);
|
||||
break;
|
||||
case CHECKBOX:
|
||||
setCheckboxParam((checkboxType) t, types);
|
||||
break;
|
||||
case FIELDPOS:
|
||||
setFieldPosParam((fieldposType) t, types);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +215,12 @@ public class FieldEditorHelper {
|
||||
return getDropdownParams((dropdownType) t);
|
||||
case NOTES_INPUT:
|
||||
return getTextParams((textType) t);
|
||||
case NUMBER:
|
||||
return getNumberParams((numberType) t);
|
||||
case CHECKBOX:
|
||||
return getCheckboxParam((checkboxType) t);
|
||||
case FIELDPOS:
|
||||
return getFieldPosParam((fieldposType) t);
|
||||
}
|
||||
return new parameterType[]{};
|
||||
}
|
||||
|
||||
@@ -24,8 +24,11 @@ import androidx.navigation.Navigation;
|
||||
import com.ridgebotics.ridgescout.R;
|
||||
import com.ridgebotics.ridgescout.databinding.FragmentDataFieldsBinding;
|
||||
import com.ridgebotics.ridgescout.scoutingData.fields;
|
||||
import com.ridgebotics.ridgescout.types.input.checkboxType;
|
||||
import com.ridgebotics.ridgescout.types.input.dropdownType;
|
||||
import com.ridgebotics.ridgescout.types.input.fieldposType;
|
||||
import com.ridgebotics.ridgescout.types.input.inputType;
|
||||
import com.ridgebotics.ridgescout.types.input.numberType;
|
||||
import com.ridgebotics.ridgescout.types.input.sliderType;
|
||||
import com.ridgebotics.ridgescout.types.input.tallyType;
|
||||
import com.ridgebotics.ridgescout.types.input.textType;
|
||||
@@ -381,6 +384,9 @@ public class FieldsFragment extends Fragment {
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Text"));
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Dropdown"));
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Tally"));
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Number"));
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Checkbox"));
|
||||
iconSpinnerItems.add(new IconSpinnerItem("Field Position"));
|
||||
|
||||
IconSpinnerAdapter iconSpinnerAdapter = new IconSpinnerAdapter(dropdown);
|
||||
|
||||
@@ -445,6 +451,24 @@ public class FieldsFragment extends Fragment {
|
||||
FieldEditorHelper.setTallyParams(tally, FieldEditorHelper.defaultTallyParams);
|
||||
addField_Part_4(tally);
|
||||
break;
|
||||
case 4:
|
||||
numberType num = new numberType();
|
||||
num.name = title;
|
||||
FieldEditorHelper.setNumberParams(num, FieldEditorHelper.defaultNumberParams);
|
||||
addField_Part_4(num);
|
||||
break;
|
||||
case 5:
|
||||
checkboxType cb = new checkboxType();
|
||||
cb.name = title;
|
||||
FieldEditorHelper.setCheckboxParam(cb, FieldEditorHelper.defaultCheckboxParam);
|
||||
addField_Part_4(cb);
|
||||
break;
|
||||
case 6:
|
||||
fieldposType fp = new fieldposType();
|
||||
fp.name = title;
|
||||
FieldEditorHelper.setFieldPosParam(fp, FieldEditorHelper.defaultFieldPosParam);
|
||||
addField_Part_4(fp);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.ridgebotics.ridgescout.ui.scouting;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ridgebotics.ridgescout.R;
|
||||
|
||||
public class FieldPosView extends FrameLayout {
|
||||
private int x = -1;
|
||||
private int y = -1;
|
||||
private Paint paint;
|
||||
private static final float POINT_RADIUS = 10f;
|
||||
private ImageView imageView;
|
||||
private boolean enabled = true;
|
||||
|
||||
public interface onTapListener {
|
||||
void onUpdate(int[] pos);
|
||||
};
|
||||
|
||||
public FieldPosView(Context context) {
|
||||
super(context);
|
||||
init(context, pos -> {});
|
||||
}
|
||||
|
||||
public FieldPosView(Context context, onTapListener tapListener) {
|
||||
super(context);
|
||||
init(context, tapListener);
|
||||
}
|
||||
|
||||
public FieldPosView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context, pos -> {});
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void init(Context context, onTapListener tl) {
|
||||
// Initialize paint
|
||||
paint = new Paint();
|
||||
paint.setColor(Color.RED);
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
|
||||
|
||||
// Create and add ImageView
|
||||
imageView = new ImageView(context);
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
|
||||
LayoutParams.MATCH_PARENT,
|
||||
LayoutParams.MATCH_PARENT
|
||||
);
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
imageView.setAdjustViewBounds(true);
|
||||
addView(imageView);
|
||||
|
||||
// Set touch listener
|
||||
setOnTouchListener((v, event) -> {
|
||||
if (enabled && event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
x = (int) ((event.getX()/getWidth())*255);
|
||||
y = (int) ((event.getY()/getHeight())*255);
|
||||
tl.onUpdate(getPos());
|
||||
invalidate();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
setImageResource(R.drawable.field_2024);
|
||||
|
||||
}
|
||||
|
||||
public void setPos(int[] pos){
|
||||
if(pos.length == 0) return;
|
||||
x = pos[0];
|
||||
y = pos[1];
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
super.dispatchDraw(canvas);
|
||||
if (x >= 0 && y >= 0) {
|
||||
canvas.drawCircle(
|
||||
((float) x /255)*getWidth(),
|
||||
((float) y /255)*getHeight(),
|
||||
POINT_RADIUS, paint);
|
||||
}
|
||||
}
|
||||
|
||||
public void setImageResource(int resId) {
|
||||
imageView.setImageResource(resId);
|
||||
}
|
||||
|
||||
public void setImageDrawable(Drawable drawable) {
|
||||
imageView.setImageDrawable(drawable);
|
||||
}
|
||||
|
||||
public void setImageBitmap(Bitmap bitmap) {
|
||||
imageView.setImageBitmap(bitmap);
|
||||
}
|
||||
|
||||
public int[] getPos() {
|
||||
return new int[]{
|
||||
x,
|
||||
y
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.ridgebotics.ridgescout.ui.scouting;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ridgebotics.ridgescout.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MultiFieldPosView extends FrameLayout {
|
||||
private Paint paint;
|
||||
private static final float POINT_RADIUS = 10f;
|
||||
private ImageView imageView;
|
||||
private List<Integer[]> points = new ArrayList<>();
|
||||
|
||||
public MultiFieldPosView(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public MultiFieldPosView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context);
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void init(Context context) {
|
||||
// Initialize paint
|
||||
paint = new Paint();
|
||||
paint.setColor(Color.RED);
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
|
||||
|
||||
// Create and add ImageView
|
||||
imageView = new ImageView(context);
|
||||
LayoutParams params = new LayoutParams(
|
||||
LayoutParams.MATCH_PARENT,
|
||||
LayoutParams.MATCH_PARENT
|
||||
);
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
||||
imageView.setAdjustViewBounds(true);
|
||||
addView(imageView);
|
||||
|
||||
setImageResource(R.drawable.field_2024);
|
||||
|
||||
}
|
||||
|
||||
public void addPos(int[] pos){
|
||||
if(pos.length != 2) return;
|
||||
points.add(new Integer[]{
|
||||
pos[0],
|
||||
pos[1]
|
||||
});
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
super.dispatchDraw(canvas);
|
||||
for(int i = 0; i < points.size(); i++){
|
||||
int x = points.get(i)[0];
|
||||
int y = points.get(i)[1];
|
||||
if (x >= 0 && y >= 0) {
|
||||
canvas.drawCircle(
|
||||
((float) x / 255) * getWidth(),
|
||||
((float) y / 255) * getHeight(),
|
||||
POINT_RADIUS, paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setImageResource(int resId) {
|
||||
imageView.setImageResource(resId);
|
||||
}
|
||||
}
|
||||
@@ -92,50 +92,6 @@ public class PitScoutingFragment extends Fragment {
|
||||
}
|
||||
|
||||
|
||||
// public void init(frcEvent event){
|
||||
//
|
||||
// evcode = event.eventCode;
|
||||
// this.event = event;
|
||||
// username = latestSettings.settings.get_username();
|
||||
//
|
||||
//// binding.eventcode.setText(evcode);
|
||||
//
|
||||
// binding.pitBackButton.setOnClickListener(view -> {
|
||||
// if(edited) save();
|
||||
// binding.pitTeamName.setVisibility(View.GONE);
|
||||
// binding.pitTeamDescription.setVisibility(View.GONE);
|
||||
// clear_fields();
|
||||
// load_teams();
|
||||
// });
|
||||
//
|
||||
// values = fields.load(fields.pitsFieldsFilename);
|
||||
//
|
||||
// if(values == null || values.length == 0){
|
||||
// TextView tv = new TextView(getContext());
|
||||
// tv.setText("Failed to load fields.\nTry to either download or create pit scouting fields.");
|
||||
// tv.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
||||
// binding.pitScoutArea.addView(tv);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// latest_values = values[values.length-1];
|
||||
// transferValues = transferType.get_transfer_values(values);
|
||||
// }
|
||||
//
|
||||
// public void clear_fields(){
|
||||
// int childCount = binding.pitScoutArea.getChildCount();
|
||||
// View[] views = new View[childCount];
|
||||
//
|
||||
// for(int i = 0; i < childCount; i++){
|
||||
// views[i] = binding.pitScoutArea.getChildAt(i);
|
||||
// }
|
||||
//
|
||||
// for(int i = 0; i < childCount; i++){
|
||||
// if(!views[i].isShown()) continue;
|
||||
// binding.pitScoutArea.removeView(views[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
public void loadTeam(){
|
||||
// clear_fields();
|
||||
|
||||
@@ -147,9 +103,6 @@ public class PitScoutingFragment extends Fragment {
|
||||
binding.pitTeamDescription.setText(team.getDescription());
|
||||
binding.pitBarTeamNum.setText(String.valueOf(team.teamNumber));
|
||||
|
||||
// binding.teamName.setText(team.teamName);
|
||||
// binding.teamDescription.setText(team.getDescription());
|
||||
|
||||
filename = evcode + "-" + team.teamNumber + ".pitscoutdata";
|
||||
|
||||
boolean new_file = !fileEditor.fileExist(filename);
|
||||
@@ -195,11 +148,7 @@ public class PitScoutingFragment extends Fragment {
|
||||
|
||||
int fi = i;
|
||||
tv.setOnClickListener(p -> {
|
||||
// boolean blank = !latest_values[fi].getViewValue().isNull();
|
||||
|
||||
// System.out.println(blank);
|
||||
|
||||
asm.update();
|
||||
update_asm();
|
||||
|
||||
if(!pit_latest_values[fi].isBlank){
|
||||
tv.setBackgroundColor(0xffff0000);
|
||||
|
||||
@@ -40,6 +40,7 @@ public class StatusFragment extends Fragment {
|
||||
}
|
||||
public static int color_found = 0x7f00ff00;
|
||||
public static int color_not_found = 0x7f7f0000;
|
||||
|
||||
private void addTableText(TableRow tr, String textStr){
|
||||
TextView text = new TextView(getContext());
|
||||
text.setTextSize(18);
|
||||
|
||||
@@ -19,6 +19,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ridgebotics.ridgescout.databinding.FragmentSettingsBinding;
|
||||
import com.ridgebotics.ridgescout.types.data.intType;
|
||||
import com.ridgebotics.ridgescout.utility.fileEditor;
|
||||
import com.ridgebotics.ridgescout.utility.settingsManager;
|
||||
|
||||
@@ -41,6 +42,17 @@ public class settingsFragment extends Fragment {
|
||||
dropdown.setAdapter(adapter);
|
||||
}
|
||||
|
||||
private int safeToInt(String num){
|
||||
if(num.isEmpty())
|
||||
return 0;
|
||||
try {
|
||||
return Integer.parseInt(num);
|
||||
}catch (NumberFormatException e){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
@@ -163,7 +175,7 @@ public class settingsFragment extends Fragment {
|
||||
team_num.addTextChangedListener(new TextWatcher() {
|
||||
|
||||
public void afterTextChanged(Editable s) {
|
||||
settingsManager.setTeamNum(Integer.parseInt(team_num.getText().toString()));
|
||||
settingsManager.setTeamNum(safeToInt(team_num.getText().toString()));
|
||||
}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
|
||||
+7
-7
@@ -74,9 +74,9 @@ public class BluetoothReceiver {
|
||||
permissionsNeeded.add(Manifest.permission.BLUETOOTH_ADMIN);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
permissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);
|
||||
}
|
||||
// if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
// permissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,11 +94,11 @@ public class BluetoothReceiver {
|
||||
boolean hasBasicPermissions = ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH) == PackageManager.PERMISSION_GRANTED &&
|
||||
ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_ADMIN) == PackageManager.PERMISSION_GRANTED;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
return hasBasicPermissions && ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
|
||||
} else {
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// return hasBasicPermissions && ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
|
||||
// } else {
|
||||
return hasBasicPermissions;
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -70,7 +70,7 @@ public class BluetoothSender {
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
permissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);
|
||||
// permissionsNeeded.add(Manifest.permission.ACCESS_FINE_LOCATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,11 +89,11 @@ public class BluetoothSender {
|
||||
boolean hasBasicPermissions = ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH) == PackageManager.PERMISSION_GRANTED &&
|
||||
ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_ADMIN) == PackageManager.PERMISSION_GRANTED;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
return hasBasicPermissions && ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
|
||||
} else {
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// return hasBasicPermissions && ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
|
||||
// } else {
|
||||
return hasBasicPermissions;
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user