diff --git a/Natives/LauncherNewsViewController.m b/Natives/LauncherNewsViewController.m index 14e64d52..eb28d7b3 100644 --- a/Natives/LauncherNewsViewController.m +++ b/Natives/LauncherNewsViewController.m @@ -1,4 +1,3 @@ -#include #import #import "LauncherNewsViewController.h" #import "LauncherPreferences.h" @@ -40,9 +39,7 @@ UIEdgeInsets insets; [webView.scrollView setShowsHorizontalScrollIndicator:NO]; [webView loadRequest:request]; [self.view addSubview:webView]; - - [self askForMicrophonePermission]; - + if(roundf(NSProcessInfo.processInfo.physicalMemory / 1048576) < 1900 && ![getPreference(@"force_unsupported_launch") boolValue]) { UIAlertController *RAMAlert = [UIAlertController alertControllerWithTitle:localize(@"login.warn.title.a7", nil) message:nil preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *ok = [UIAlertAction actionWithTitle:localize(@"OK", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { @@ -108,25 +105,4 @@ decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { decisionHandler(WKNavigationActionPolicyAllow); } -- (void)askForMicrophonePermission { - switch ([[AVAudioSession sharedInstance] recordPermission]) { - case AVAudioSessionRecordPermissionGranted: - setenv("POJAV_MIC_ALLOWED", "1", 1); - break; - case AVAudioSessionRecordPermissionDenied: - break; - case AVAudioSessionRecordPermissionUndetermined: - // This is the initial state before a user has made any choice - // You can use this spot to request permission here if you want - [[AVAudioSession sharedInstance]requestRecordPermission:^(BOOL granted) { - if(granted) { - setenv("POJAV_MIC_ALLOWED", "1", 1); - } - }]; - break; - default: - break; - } -} - @end