From 57294b01c615541b4651b2ca3076843e45a2add6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 27 Oct 2018 06:03:03 +0200 Subject: AppDelegate: Get rid of `MPRemoteCommandCenter` code This code was a test for Bluetooth event handling. It didn't work for that purpose as far as I could tell. Since it's not being used, delete it. --- DomeKey/AppDelegate.h | 2 -- DomeKey/AppDelegate.m | 23 ----------------------- DomeKey/HeadphoneKey.h | 1 - 3 files changed, 26 deletions(-) diff --git a/DomeKey/AppDelegate.h b/DomeKey/AppDelegate.h index a8f2d01..4b2fc4f 100644 --- a/DomeKey/AppDelegate.h +++ b/DomeKey/AppDelegate.h @@ -12,11 +12,9 @@ @interface AppDelegate : NSObject { HeadphoneKey *_headphone_key; - MPRemoteCommandCenter *_blargh; Config *_config; } - (instancetype)initWithConfig:(Config *)config; -- (void)mpmediaplayerBS; @end diff --git a/DomeKey/AppDelegate.m b/DomeKey/AppDelegate.m index 2146ef6..a1e6563 100644 --- a/DomeKey/AppDelegate.m +++ b/DomeKey/AppDelegate.m @@ -23,29 +23,6 @@ { _headphone_key = [[HeadphoneKey alloc] initWithTimeout:_config->timeout]; [_headphone_key startMonitoringBluetoothEvents]; - - _blargh = [MPRemoteCommandCenter sharedCommandCenter]; - - [[_blargh togglePlayPauseCommand] addTarget:self action:@selector(mpmediaplayerplaypauesss:)]; -} - -- (void)mpmediaplayerBS -{ - MPRemoteCommandCenter *center = [MPRemoteCommandCenter sharedCommandCenter]; - - [[center togglePlayPauseCommand] addTarget:self action:@selector(mpmediaplayerplaypauesss:)]; -// pauseCommand -// playCommand -// togglePlayPauseCommand -// nextTrackCommand -// previousTrackCommand -} - -- (MPRemoteCommandHandlerStatus) mpmediaplayerplaypauesss: (MPRemoteCommandEvent*) event -{ - NSLog(@"Played from MPMediaPlayer"); - - return MPRemoteCommandHandlerStatusSuccess; } @end diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h index 0ef6fe7..ad6f8dd 100644 --- a/DomeKey/HeadphoneKey.h +++ b/DomeKey/HeadphoneKey.h @@ -7,7 +7,6 @@ // #import -#import #import #import "dome_key_map.h" -- cgit v1.2.3