Revert "Adjusted checks for auto-type permissions"

This reverts commit 7095d55670.

# Conflicts:
#	MacPass/MPAutotypeEnvironment.h
#	MacPass/MPAutotypeEnvironment.m
This commit is contained in:
Michael Starke
2020-11-03 11:15:50 +01:00
parent 499b7fdd6b
commit e82e2fe4a2
6 changed files with 20 additions and 40 deletions

View File

@@ -51,17 +51,14 @@
return instance;
}
- (BOOL)hasNecessaryPermissionForTask:(MPAutotypeTask)task {
BOOL permissionsOK = YES;
switch(task) {
case MPAutotypeTaskGlobalAutotype:
permissionsOK &= [self hasScreenRecordingPermissions:NULL];
// fallthrough!
case MPAutotypeTaskAutotype:
permissionsOK &= [self hasAccessibiltyPermissions:NULL];
break;
- (BOOL)hasNecessaryAutotypePermissions {
if(![self hasAccessibiltyPermissions:NULL]) {
return NO;
}
return permissionsOK;
if(![self hasScreenRecordingPermissions:NULL]) {
return NO;
}
return YES;
}
- (BOOL)hasScreenRecordingPermissions:(NSError *__autoreleasing*)error {