[Sandbox] Disable distributed iTunes notification

This notification can't escape the sandbox anyway, and I forgot to
remove it after adding the app sandbox code again.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-20 16:43:21 -07:00
parent 9dbe0a0d3e
commit 9d559481d3
1 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,7 @@
#import "PlaylistEntry.h" #import "PlaylistEntry.h"
#if 0
NSString *TrackNotification = @"com.apple.iTunes.playerInfo"; NSString *TrackNotification = @"com.apple.iTunes.playerInfo";
NSString *TrackArtist = @"Artist"; NSString *TrackArtist = @"Artist";
@ -23,6 +24,7 @@ NSString *TrackState = @"Player State";
typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying, typedef NS_ENUM(NSInteger, TrackStatus) { TrackPlaying,
TrackPaused, TrackPaused,
TrackStopped }; TrackStopped };
#endif
@implementation PlaybackEventController { @implementation PlaybackEventController {
NSOperationQueue *queue; NSOperationQueue *queue;
@ -105,6 +107,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
} }
} }
#if 0
- (NSDictionary *)fillNotificationDictionary:(PlaylistEntry *)pe status:(TrackStatus)status { - (NSDictionary *)fillNotificationDictionary:(PlaylistEntry *)pe status:(TrackStatus)status {
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; NSMutableDictionary *dict = [NSMutableDictionary dictionary];
if(pe == nil || pe.deLeted || pe.url == nil) return dict; if(pe == nil || pe.deLeted || pe.url == nil) return dict;
@ -140,16 +143,19 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
return dict; return dict;
} }
#endif
- (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe { - (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe {
if(NO == [pe error]) { if(NO == [pe error]) {
entry = pe; entry = pe;
#if 0
[[NSDistributedNotificationCenter defaultCenter] [[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification postNotificationName:TrackNotification
object:nil object:nil
userInfo:[self fillNotificationDictionary:pe status:TrackPlaying] userInfo:[self fillNotificationDictionary:pe status:TrackPlaying]
deliverImmediately:YES]; deliverImmediately:YES];
#endif
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@ -283,27 +289,33 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
} }
- (void)performPlaybackDidPauseActions { - (void)performPlaybackDidPauseActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter] [[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification postNotificationName:TrackNotification
object:nil object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPaused] userInfo:[self fillNotificationDictionary:entry status:TrackPaused]
deliverImmediately:YES]; deliverImmediately:YES];
#endif
} }
- (void)performPlaybackDidResumeActions { - (void)performPlaybackDidResumeActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter] [[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification postNotificationName:TrackNotification
object:nil object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackPlaying] userInfo:[self fillNotificationDictionary:entry status:TrackPlaying]
deliverImmediately:YES]; deliverImmediately:YES];
#endif
} }
- (void)performPlaybackDidStopActions { - (void)performPlaybackDidStopActions {
#if 0
[[NSDistributedNotificationCenter defaultCenter] [[NSDistributedNotificationCenter defaultCenter]
postNotificationName:TrackNotification postNotificationName:TrackNotification
object:nil object:nil
userInfo:[self fillNotificationDictionary:entry status:TrackStopped] userInfo:[self fillNotificationDictionary:entry status:TrackStopped]
deliverImmediately:YES]; deliverImmediately:YES];
#endif
entry = nil; entry = nil;
} }