From 8e096e3ec7f154d6ac2511de624694ffc3184b2b Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 19 Mar 2019 14:55:31 +0100 Subject: [PATCH] fix using non public api --- Classes/SettingsView.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m index f0f242c12..d60dbd860 100644 --- a/Classes/SettingsView.m +++ b/Classes/SettingsView.m @@ -35,8 +35,8 @@ #ifdef DEBUG @interface UIDevice (debug) -- (void)_setBatteryLevel:(float)level; -- (void)_setBatteryState:(int)state; +- (void)setBatteryLevel:(float)level; +- (void)setBatteryState:(int)state; @end #endif @@ -759,8 +759,8 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat [PhoneMainView.instance.mainViewController clearCache:[NSArray arrayWithObject:[PhoneMainView.instance currentView]]]; } else if ([key isEqual:@"battery_alert_button"]) { - [[UIDevice currentDevice] _setBatteryState:UIDeviceBatteryStateUnplugged]; - [[UIDevice currentDevice] _setBatteryLevel:0.01f]; + [[UIDevice currentDevice] setBatteryState:UIDeviceBatteryStateUnplugged]; + [[UIDevice currentDevice] setBatteryLevel:0.01f]; [NSNotificationCenter.defaultCenter postNotificationName:UIDeviceBatteryLevelDidChangeNotification object:self]; } else if ([key isEqual:@"flush_images_button"]) { const MSList *rooms = linphone_core_get_chat_rooms(LC);