mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-19 02:29:25 +01:00
Remove permissionscheck snackbar builder
This commit is contained in:
parent
b387a6e8de
commit
d9bb26828c
@ -64,28 +64,4 @@ public class Conditions {
|
||||
v.getContext().startActivity(intent);
|
||||
}
|
||||
}).build();
|
||||
|
||||
private static final String[] REQUIRED_PERMISSIONS = new String[]{};
|
||||
public static final Condition PERMISSIONS = new Condition.Builder()
|
||||
.title(R.string.cond_perm_title)
|
||||
.summaryPlurals(R.plurals.cond_perm_summary)
|
||||
.evaluation(new Condition.Evaluation() {
|
||||
@Override
|
||||
public boolean isActive(Context context) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPluralsCount() {
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
.firstActionPlurals(R.plurals.cond_perm_action, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getContext() instanceof Activity) {
|
||||
ActivityCompat.requestPermissions((Activity) v.getContext(), REQUIRED_PERMISSIONS, 0);
|
||||
}
|
||||
}
|
||||
}).build();
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public class SettingsActivity extends AbstractDashboardActivity {
|
||||
public SettingsActivity() {
|
||||
preferencesResource = R.xml.preferences_start;
|
||||
addCondition(Conditions.GCM_BATTERY_OPTIMIZATIONS);
|
||||
addCondition(Conditions.PERMISSIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user