forked from mirrors/linphone-iphone
Remplace UIActionSheet by DTActionSheet
This commit is contained in:
parent
4a04f72a66
commit
1efcaaa03d
12 changed files with 67 additions and 243 deletions
|
|
@ -1,46 +0,0 @@
|
|||
/* LinphoneManager.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "linphonecore.h"
|
||||
|
||||
enum CallDelegateType {
|
||||
CD_UNDEFINED = 0,
|
||||
CD_ZRTP,
|
||||
CD_VIDEO_UPDATE,
|
||||
CD_STOP_VIDEO_ON_LOW_BATTERY
|
||||
};
|
||||
|
||||
@protocol CallActionSheetDelegate
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType) type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas;
|
||||
@end
|
||||
|
||||
@interface CallDelegate : NSObject<UIActionSheetDelegate> {
|
||||
enum CallDelegateType eventType;
|
||||
LinphoneCall* call;
|
||||
id<CallActionSheetDelegate> delegate;
|
||||
NSTimer* timeout;
|
||||
}
|
||||
|
||||
@property (nonatomic) enum CallDelegateType eventType;
|
||||
@property (nonatomic) LinphoneCall* call;
|
||||
@property (nonatomic, retain) id delegate;
|
||||
@property (nonatomic, retain) NSTimer* timeout;
|
||||
|
||||
@end
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/* LinphoneManager.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "CallDelegate.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation CallDelegate
|
||||
|
||||
@synthesize eventType;
|
||||
@synthesize call;
|
||||
@synthesize delegate;
|
||||
@synthesize timeout;
|
||||
|
||||
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if (timeout) {
|
||||
[timeout invalidate];
|
||||
timeout = nil;
|
||||
}
|
||||
if (eventType == CD_UNDEFINED) {
|
||||
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
|
||||
}
|
||||
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call];
|
||||
}
|
||||
|
||||
-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
|
||||
|
||||
|
||||
if (timeout) {
|
||||
[timeout invalidate];
|
||||
timeout = nil;
|
||||
}
|
||||
if (buttonIndex != actionSheet.cancelButtonIndex) return;
|
||||
|
||||
if (eventType == CD_UNDEFINED) {
|
||||
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
|
||||
}
|
||||
|
||||
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call];
|
||||
}
|
||||
|
||||
-(void) actionSheetCancel:(UIActionSheet *)actionSheet {
|
||||
if (timeout) {
|
||||
[timeout invalidate];
|
||||
timeout = nil;
|
||||
}
|
||||
if (eventType == CD_UNDEFINED) {
|
||||
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
|
||||
}
|
||||
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:actionSheet.cancelButtonIndex withUserDatas:call];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AssetsLibrary/ALAssetsLibrary.h>
|
||||
|
||||
#import "UIToggleButton.h"
|
||||
#import "UICompositeViewController.h"
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
@private
|
||||
LinphoneChatRoom *chatRoom;
|
||||
ImageSharing *imageSharing;
|
||||
ALAssetsLibrary *photoLibrary;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@
|
|||
#import "PhoneMainView.h"
|
||||
#import "DTActionSheet.h"
|
||||
|
||||
#import <MobileCoreServices/UTCoreTypes.h>
|
||||
#import <NinePatch.h>
|
||||
#import <AssetsLibrary/ALAssetsLibrary.h>
|
||||
|
||||
|
||||
@implementation ChatRoomViewController
|
||||
|
|
@ -55,6 +53,7 @@
|
|||
if (self != nil) {
|
||||
self->chatRoom = NULL;
|
||||
self->imageSharing = NULL;
|
||||
self->photoLibrary = [[ALAssetsLibrary alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -80,6 +79,9 @@
|
|||
[pictureButton release];
|
||||
[imageTransferProgressBar release];
|
||||
[cancelTransferButton release];
|
||||
|
||||
[photoLibrary release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +336,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[transferView setHidden:FALSE];
|
||||
}];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Ignore",nil)];
|
||||
[sheet showInView:self.view];
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
} else {
|
||||
[LinphoneLogger logc:LinphoneLoggerWarning format:"Invalid textReceivedEvent"];
|
||||
|
|
@ -491,8 +493,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[footerView setHidden:FALSE];
|
||||
[transferView setHidden:TRUE];
|
||||
|
||||
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
|
||||
[library writeImageToSavedPhotosAlbum:(CGImageRef)image
|
||||
[photoLibrary writeImageToSavedPhotosAlbum:(CGImageRef)image
|
||||
metadata:nil
|
||||
completionBlock:^(NSURL *assetURL, NSError *error){
|
||||
if (error) {
|
||||
|
|
@ -505,9 +506,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[controller setImage:image];
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
[library release];
|
||||
imageSharing = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,20 +21,18 @@
|
|||
|
||||
#import "VideoZoomHandler.h"
|
||||
#import "UICamSwitch.h"
|
||||
#import "CallDelegate.h"
|
||||
|
||||
#import "UICompositeViewController.h"
|
||||
#import "InCallTableViewController.h"
|
||||
|
||||
@class VideoViewController;
|
||||
|
||||
@interface InCallViewController : UIViewController <CallActionSheetDelegate, UIGestureRecognizerDelegate, UICompositeViewDelegate> {
|
||||
@interface InCallViewController : UIViewController <UIGestureRecognizerDelegate, UICompositeViewDelegate> {
|
||||
@private
|
||||
UITapGestureRecognizer* singleFingerTap;
|
||||
NSTimer* hideControlsTimer;
|
||||
BOOL videoShown;
|
||||
VideoZoomHandler* videoZoomHandler;
|
||||
UIActionSheet* visibleActionSheet;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet InCallTableViewController* callTableController;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#import "LinphoneManager.h"
|
||||
#import "PhoneMainView.h"
|
||||
#import "UILinphone.h"
|
||||
#import "DTActionSheet.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
|
||||
|
|
@ -119,9 +120,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if (visibleActionSheet != nil) {
|
||||
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:NO];
|
||||
}
|
||||
if (hideControlsTimer != nil) {
|
||||
[hideControlsTimer invalidate];
|
||||
hideControlsTimer = nil;
|
||||
|
|
@ -464,13 +462,6 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
|
|||
|
||||
#pragma mark - ActionSheet Functions
|
||||
|
||||
- (void)dismissActionSheet: (id)o {
|
||||
if (visibleActionSheet != nil) {
|
||||
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
|
||||
visibleActionSheet = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)displayAskToEnableVideoCall:(LinphoneCall*) call {
|
||||
if (linphone_core_get_video_policy([LinphoneManager getLc])->automatically_accept)
|
||||
return;
|
||||
|
|
@ -480,62 +471,29 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
|
|||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call));
|
||||
NSString* lDisplayName = [lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"" autorelease];
|
||||
|
||||
// ask the user if he agrees
|
||||
CallDelegate* cd = [[CallDelegate alloc] init];
|
||||
cd.eventType = CD_VIDEO_UPDATE;
|
||||
cd.delegate = self;
|
||||
cd.call = call;
|
||||
|
||||
if (visibleActionSheet != nil) {
|
||||
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
|
||||
}
|
||||
NSString* title = [NSString stringWithFormat : NSLocalizedString(@"'%@' would like to enable video",nil), ([lDisplayName length] > 0)?lDisplayName:lUserName];
|
||||
visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title
|
||||
delegate:cd
|
||||
cancelButtonTitle:NSLocalizedString(@"Decline",nil)
|
||||
destructiveButtonTitle:NSLocalizedString(@"Accept",nil)
|
||||
otherButtonTitles:nil];
|
||||
|
||||
visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[visibleActionSheet showInView:[PhoneMainView instance].view];
|
||||
|
||||
/* start cancel timer */
|
||||
cd.timeout = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissActionSheet:) userInfo:nil repeats:NO];
|
||||
[visibleActionSheet release];
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:title] autorelease];
|
||||
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissVideoActionSheet:) userInfo:sheet repeats:NO];
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Accept", nil) block:^() {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"User accept video proposal"];
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
linphone_call_params_enable_video(paramsCopy, TRUE);
|
||||
linphone_core_accept_call_update([LinphoneManager getLc], call, paramsCopy);
|
||||
linphone_call_params_destroy(paramsCopy);
|
||||
[timer invalidate];
|
||||
}];
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Decline", nil) block:^() {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"User declined video proposal"];
|
||||
linphone_core_accept_call_update([LinphoneManager getLc], call, NULL);
|
||||
[timer invalidate];
|
||||
}];
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
|
||||
LinphoneCall* call = (LinphoneCall*)datas;
|
||||
// maybe we could verify call validity
|
||||
|
||||
switch (type) {
|
||||
case CD_ZRTP: {
|
||||
if (buttonIndex == 0)
|
||||
linphone_call_set_authentication_token_verified(call, YES);
|
||||
else if (buttonIndex == 1)
|
||||
linphone_call_set_authentication_token_verified(call, NO);
|
||||
visibleActionSheet = nil;
|
||||
break;
|
||||
}
|
||||
case CD_VIDEO_UPDATE: {
|
||||
LinphoneCall* call = (LinphoneCall*)datas;
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
if ([visibleActionSheet destructiveButtonIndex] == buttonIndex) {
|
||||
// accept video
|
||||
linphone_call_params_enable_video(paramsCopy, TRUE);
|
||||
linphone_core_accept_call_update([LinphoneManager getLc], call, paramsCopy);
|
||||
} else {
|
||||
// decline video
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"User declined video proposal"];
|
||||
linphone_core_accept_call_update([LinphoneManager getLc], call, NULL);
|
||||
}
|
||||
linphone_call_params_destroy(paramsCopy);
|
||||
visibleActionSheet = nil;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
[LinphoneLogger logc:LinphoneLoggerError format:"Unhandled CallDelegate event of type: %d received - ignoring", type];
|
||||
}
|
||||
- (void)dismissVideoActionSheet:(NSTimer*)timer {
|
||||
DTActionSheet *sheet = (DTActionSheet *)timer.userInfo;
|
||||
[sheet dismissWithClickedButtonIndex:sheet.destructiveButtonIndex animated:TRUE];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -178,12 +178,12 @@ NSTimer *callSecurityTimer;
|
|||
BOOL security = true;
|
||||
|
||||
if(![LinphoneManager isLcReady]) {
|
||||
[callSecurityImage setHidden: true];
|
||||
[callSecurityImage setHidden:true];
|
||||
return;
|
||||
}
|
||||
const MSList *list = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
if(list == NULL) {
|
||||
[callSecurityImage setHidden: true];
|
||||
[callSecurityImage setHidden:true];
|
||||
return;
|
||||
}
|
||||
while(list != NULL) {
|
||||
|
|
@ -229,10 +229,10 @@ NSTimer *callSecurityTimer;
|
|||
}
|
||||
}
|
||||
if(image != nil) {
|
||||
[callQualityImage setHidden: false];
|
||||
[callQualityImage setImage: image];
|
||||
[callQualityImage setHidden:false];
|
||||
[callQualityImage setImage:image];
|
||||
} else {
|
||||
[callQualityImage setHidden: true];
|
||||
[callQualityImage setHidden:true];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@
|
|||
#import "ConsoleViewController.h"
|
||||
#import "ImageViewController.h"
|
||||
|
||||
@interface PhoneMainView : UIViewController<CallActionSheetDelegate, IncomingCallViewDelegate> {
|
||||
@interface PhoneMainView : UIViewController<IncomingCallViewDelegate> {
|
||||
@private
|
||||
UIActionSheet *batteryActionSheet;
|
||||
int loadCount;
|
||||
NSMutableArray *viewStack;
|
||||
NSMutableArray *inhibitedEvents;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#import "LinphoneAppDelegate.h"
|
||||
#import "PhoneMainView.h"
|
||||
#import "Utils.h"
|
||||
#import "DTActionSheet.h"
|
||||
|
||||
static PhoneMainView* phoneMainViewInstance=nil;
|
||||
|
||||
|
|
@ -704,7 +705,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
}
|
||||
|
||||
- (void)batteryLevelChanged:(NSNotification*)notif {
|
||||
if (! [LinphoneManager isLcReady]) return;
|
||||
if (![LinphoneManager isLcReady]) return;
|
||||
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (!call || !linphone_call_params_video_enabled(linphone_call_get_current_params(call)))
|
||||
return;
|
||||
|
|
@ -713,48 +714,17 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
float level = [UIDevice currentDevice].batteryLevel;
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"Video call is running. Battery level: %.2f", level];
|
||||
if (level < 0.1 && !appData->batteryWarningShown) {
|
||||
// notify user
|
||||
CallDelegate* cd = [[CallDelegate alloc] init];
|
||||
cd.eventType = CD_STOP_VIDEO_ON_LOW_BATTERY;
|
||||
cd.delegate = self;
|
||||
cd.call = call;
|
||||
|
||||
if (batteryActionSheet != nil) {
|
||||
[batteryActionSheet dismissWithClickedButtonIndex:batteryActionSheet.cancelButtonIndex animated:TRUE];
|
||||
}
|
||||
NSString* title = NSLocalizedString(@"Battery is running low. Stop video ?",nil);
|
||||
batteryActionSheet = [[UIActionSheet alloc] initWithTitle:title
|
||||
delegate:cd
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue video",nil)
|
||||
destructiveButtonTitle:NSLocalizedString(@"Stop video",nil)
|
||||
otherButtonTitles:nil];
|
||||
|
||||
batteryActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[batteryActionSheet showInView: self.view];
|
||||
[batteryActionSheet release];
|
||||
appData->batteryWarningShown = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type
|
||||
clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||
withUserDatas:(void *)datas {
|
||||
switch(type) {
|
||||
case CD_STOP_VIDEO_ON_LOW_BATTERY:
|
||||
{
|
||||
LinphoneCall* call = (LinphoneCall*)datas;
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
if (buttonIndex == [batteryActionSheet destructiveButtonIndex]) {
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Battery is running low. Stop video ?",nil)] autorelease];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Continue video", nil)];
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Stop video", nil) block:^() {
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
// stop video
|
||||
linphone_call_params_enable_video(paramsCopy, FALSE);
|
||||
linphone_core_update_call([LinphoneManager getLc], call, paramsCopy);
|
||||
}
|
||||
batteryActionSheet = nil;
|
||||
break;
|
||||
}];
|
||||
[sheet showInView:self.view];
|
||||
appData->batteryWarningShown = TRUE;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,15 @@
|
|||
#import "IASKTextField.h"
|
||||
#include "lpconfig.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
@interface UIDevice (debug)
|
||||
|
||||
- (void)_setBatteryLevel:(float)level;
|
||||
- (void)_setBatteryState:(int)state;
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
||||
#pragma mark - IASKSwitchEx Class
|
||||
|
||||
@interface IASKSwitchEx : DCRoundSwitch {
|
||||
|
|
@ -478,6 +487,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
#ifndef DEBUG
|
||||
[hiddenKeys addObject:@"release_button"];
|
||||
[hiddenKeys addObject:@"clear_cache_button"];
|
||||
[hiddenKeys addObject:@"battery_alert_button"];
|
||||
#endif
|
||||
|
||||
[hiddenKeys addObject:@"quit_button"]; // Hide for the moment
|
||||
|
|
@ -523,7 +533,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
return hiddenKeys;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - IASKSettingsDelegate Functions
|
||||
|
||||
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender {
|
||||
|
|
@ -539,6 +548,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[LinphoneManager instanceRelease];
|
||||
} else if([key isEqual:@"clear_cache_button"]) {
|
||||
[[PhoneMainView instance].mainViewController clearCache];
|
||||
} else if([key isEqual:@"battery_alert_button"]) {
|
||||
[[UIDevice currentDevice] _setBatteryState:UIDeviceBatteryStateUnplugged];
|
||||
[[UIDevice currentDevice] _setBatteryLevel:0.09f];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:UIDeviceBatteryLevelDidChangeNotification object:self];
|
||||
}
|
||||
#endif
|
||||
if([key isEqual:@"console_button"]) {
|
||||
|
|
|
|||
|
|
@ -192,6 +192,14 @@
|
|||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Key</key>
|
||||
<string>battery_alert_button</string>
|
||||
<key>Title</key>
|
||||
<string>Battery alert</string>
|
||||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
220FAD3710765B400068D98F /* libosipparser2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2E10765B400068D98F /* libosipparser2.a */; };
|
||||
220FAD3810765B400068D98F /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2F10765B400068D98F /* libspeex.a */; };
|
||||
220FAD3910765B400068D98F /* libspeexdsp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD3010765B400068D98F /* libspeexdsp.a */; };
|
||||
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
|
||||
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
|
||||
2214783D1386A2030020F8B8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; };
|
||||
2214EB7A12F846B1002A5394 /* UICallButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB7912F846B1002A5394 /* UICallButton.m */; };
|
||||
2214EB8912F84EBB002A5394 /* UIHangUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB8812F84EBB002A5394 /* UIHangUpButton.m */; };
|
||||
|
|
@ -1352,7 +1350,6 @@
|
|||
220FAD2F10765B400068D98F /* libspeex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeex.a; path = "liblinphone-sdk/apple-darwin/lib/libspeex.a"; sourceTree = "<group>"; };
|
||||
220FAD3010765B400068D98F /* libspeexdsp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeexdsp.a; path = "liblinphone-sdk/apple-darwin/lib/libspeexdsp.a"; sourceTree = "<group>"; };
|
||||
2211DB911475562600DEE054 /* liblinphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblinphone.a; path = "liblinphone-sdk/apple-darwin/lib/liblinphone.a"; sourceTree = "<group>"; };
|
||||
2211DBBB14769C8200DEE054 /* CallDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallDelegate.m; sourceTree = "<group>"; };
|
||||
2214783C1386A2030020F8B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
2214EB7812F846B1002A5394 /* UICallButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallButton.h; sourceTree = "<group>"; };
|
||||
2214EB7912F846B1002A5394 /* UICallButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallButton.m; sourceTree = "<group>"; };
|
||||
|
|
@ -1499,7 +1496,6 @@
|
|||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = "<group>"; };
|
||||
340751961506459A00B89C47 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
|
||||
340751E4150E4D0200B89C47 /* CallDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallDelegate.h; sourceTree = "<group>"; };
|
||||
340751E5150F38FC00B89C47 /* UIVideoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoButton.h; sourceTree = "<group>"; };
|
||||
340751E6150F38FD00B89C47 /* UIVideoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIVideoButton.m; sourceTree = "<group>"; };
|
||||
34216F3E1547EBCD00EA9777 /* VideoZoomHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoZoomHandler.h; path = LinphoneUI/VideoZoomHandler.h; sourceTree = "<group>"; };
|
||||
|
|
@ -2224,8 +2220,6 @@
|
|||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
340751E4150E4D0200B89C47 /* CallDelegate.h */,
|
||||
2211DBBB14769C8200DEE054 /* CallDelegate.m */,
|
||||
D32B6E2715A5BC430033019F /* ChatRoomTableViewController.h */,
|
||||
D32B6E2815A5BC430033019F /* ChatRoomTableViewController.m */,
|
||||
D3F795D315A582800077328B /* ChatRoomViewController.h */,
|
||||
|
|
@ -4396,7 +4390,6 @@
|
|||
22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */,
|
||||
22BB1A69132FF16A005CD7AA /* UIEraseButton.m in Sources */,
|
||||
22AA8B0113D83F6300B30535 /* UICamSwitch.m in Sources */,
|
||||
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */,
|
||||
340751E7150F38FD00B89C47 /* UIVideoButton.m in Sources */,
|
||||
34216F401547EBCD00EA9777 /* VideoZoomHandler.m in Sources */,
|
||||
D3F83EEC1582021700336684 /* InCallViewController.m in Sources */,
|
||||
|
|
@ -4491,7 +4484,6 @@
|
|||
22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */,
|
||||
22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */,
|
||||
22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */,
|
||||
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */,
|
||||
340751E8150F38FD00B89C47 /* UIVideoButton.m in Sources */,
|
||||
34216F411547EBCD00EA9777 /* VideoZoomHandler.m in Sources */,
|
||||
D3F83EED1582021700336684 /* InCallViewController.m in Sources */,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue