@@ -646,11 +646,11 @@ public void onMethodCall(MethodCall call, Result result) {
646
646
}
647
647
}
648
648
649
- void ensurePermissionBeforeAction (String permissionA12 , String permission , OperationOnPermission operation ) {
649
+ private void ensurePermissionBeforeAction (String permissionA12 , String permission , OperationOnPermission operation ) {
650
650
ensurePermissionsBeforeAction (new String []{ permissionA12 }, permission , operation );
651
651
}
652
652
653
- void ensurePermissionsBeforeAction (String [] permissionsA12 , String permission , OperationOnPermission operation ) {
653
+ private void ensurePermissionsBeforeAction (String [] permissionsA12 , String permission , OperationOnPermission operation ) {
654
654
String [] permissions = Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ? permissionsA12 : permission != null ? new String [] { permission } : null ;
655
655
if (!allPermissionsGranted (permissions )) {
656
656
operationsOnPermission .put (lastEventId , (granted , perm ) -> {
@@ -667,8 +667,8 @@ void ensurePermissionsBeforeAction(String[] permissionsA12, String permission, O
667
667
}
668
668
}
669
669
670
- boolean allPermissionsGranted (String [] permissions ) {
671
- if (permissions == null ) return false ;
670
+ private boolean allPermissionsGranted (String [] permissions ) {
671
+ if (permissions == null ) return true ;
672
672
for (int i = 0 ; i < permissions .length ; i ++) {
673
673
if (ContextCompat .checkSelfPermission (context , permissions [i ]) != PackageManager .PERMISSION_GRANTED )
674
674
return false ;
@@ -1017,7 +1017,7 @@ public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
1017
1017
}
1018
1018
};
1019
1019
1020
- enum LogLevel
1020
+ private enum LogLevel
1021
1021
{
1022
1022
EMERGENCY , ALERT , CRITICAL , ERROR , WARNING , NOTICE , INFO , DEBUG ;
1023
1023
}
@@ -1041,7 +1041,7 @@ public void run() {
1041
1041
1042
1042
// BluetoothDeviceCache contains any other cached information not stored in Android Bluetooth API
1043
1043
// but still needed Dart side.
1044
- class BluetoothDeviceCache {
1044
+ private class BluetoothDeviceCache {
1045
1045
final BluetoothGatt gatt ;
1046
1046
int mtu ;
1047
1047
0 commit comments