diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m
index 47c0b79fb..2327a34d0 100644
--- a/Classes/LinphoneCoreSettingsStore.m
+++ b/Classes/LinphoneCoreSettingsStore.m
@@ -204,7 +204,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
}
[self setString:val forKey:@"media_encryption_preference"];
}
- [self setString: lp_config_get_string(conf, LINPHONERC_APPLICATION_KEY, "rotation_preference", "auto") forKey:@"rotation_preference"];
[self setBool: lp_config_get_int(conf, LINPHONERC_APPLICATION_KEY, "edge_opt_preference", 0) forKey:@"edge_opt_preference"];
[self setBool: lp_config_get_int(conf, LINPHONERC_APPLICATION_KEY, "enable_first_login_view_preference", 0) forKey:@"enable_first_login_view_preference"];
[self setBool: lp_config_get_int(conf, LINPHONERC_APPLICATION_KEY, "debugenable_preference", 0) forKey:@"debugenable_preference"];
@@ -684,9 +683,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
BOOL edgeOpt = [self boolForKey:@"edge_opt_preference"];
lp_config_set_int(config, LINPHONERC_APPLICATION_KEY, "edge_opt_preference", edgeOpt);
- NSString *landscape = [self stringForKey:@"rotation_preference"];
- lp_config_set_string(config, LINPHONERC_APPLICATION_KEY, "rotation_preference", [landscape UTF8String]);
-
BOOL debugmode = [self boolForKey:@"debugenable_preference"];
lp_config_set_int(config, LINPHONERC_APPLICATION_KEY, "debugenable_preference", debugmode);
[[LinphoneManager instance] setLogsEnabled:debugmode];
diff --git a/Classes/LinphoneUI/UICompositeViewController.m b/Classes/LinphoneUI/UICompositeViewController.m
index 629370009..f5e4126f5 100644
--- a/Classes/LinphoneUI/UICompositeViewController.m
+++ b/Classes/LinphoneUI/UICompositeViewController.m
@@ -372,76 +372,45 @@
[controller view]; // Load the view
}
}
- return controller;
+ return controller;
}
- (UIInterfaceOrientation)getCorrectInterfaceOrientation:(UIDeviceOrientation)deviceOrientation {
- if(currentViewDescription != nil) {
- // If unknown return status bar orientation
- if(deviceOrientation == UIDeviceOrientationUnknown && currentOrientation == UIDeviceOrientationUnknown) {
- return [UIApplication sharedApplication].statusBarOrientation;
- }
-
- NSString* rotationPreference = [[LinphoneManager instance] lpConfigStringForKey:@"rotation_preference"];
- if([rotationPreference isEqualToString:@"auto"]) {
- // Don't rotate in UIDeviceOrientationFaceUp UIDeviceOrientationFaceDown
- if(!UIDeviceOrientationIsPortrait(deviceOrientation) && !UIDeviceOrientationIsLandscape(deviceOrientation)) {
- if(currentOrientation == UIDeviceOrientationUnknown) {
- return [UIApplication sharedApplication].statusBarOrientation;
- }
- deviceOrientation = (UIDeviceOrientation)currentOrientation;
- }
- if (UIDeviceOrientationIsPortrait(deviceOrientation)) {
- if ([currentViewDescription portraitMode]) {
- return (UIInterfaceOrientation)deviceOrientation;
- } else {
- return UIInterfaceOrientationLandscapeLeft;
- }
- }
- if (UIDeviceOrientationIsLandscape(deviceOrientation)) {
- if ([currentViewDescription landscapeMode]) {
- return (UIInterfaceOrientation)deviceOrientation;
- } else {
- return UIInterfaceOrientationPortrait;
- }
- }
- } else if([rotationPreference isEqualToString:@"portrait"]) {
- if ([currentViewDescription portraitMode]) {
- if (UIDeviceOrientationIsPortrait(deviceOrientation)) {
- return (UIInterfaceOrientation)deviceOrientation;
- } else {
- if(UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) {
- return [UIApplication sharedApplication].statusBarOrientation;
- } else {
- return UIInterfaceOrientationPortrait;
- }
- }
- } else {
- return UIInterfaceOrientationLandscapeLeft;
- }
- } else if([rotationPreference isEqualToString:@"landscape"]) {
- if ([currentViewDescription landscapeMode]) {
- if (UIDeviceOrientationIsLandscape(deviceOrientation)) {
- return (UIInterfaceOrientation)deviceOrientation;
- } else {
- if(UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
- return [UIApplication sharedApplication].statusBarOrientation;
- } else {
- return UIInterfaceOrientationLandscapeLeft;
- }
- }
- } else {
- return UIInterfaceOrientationPortrait;
- }
- }
- }
+ if(currentViewDescription != nil) {
+ // If unknown return status bar orientation
+ if(deviceOrientation == UIDeviceOrientationUnknown && currentOrientation == UIDeviceOrientationUnknown) {
+ return [UIApplication sharedApplication].statusBarOrientation;
+ }
+
+ // Don't rotate in UIDeviceOrientationFaceUp UIDeviceOrientationFaceDown
+ if(!UIDeviceOrientationIsPortrait(deviceOrientation) && !UIDeviceOrientationIsLandscape(deviceOrientation)) {
+ if(currentOrientation == UIDeviceOrientationUnknown) {
+ return [UIApplication sharedApplication].statusBarOrientation;
+ }
+ deviceOrientation = (UIDeviceOrientation)currentOrientation;
+ }
+ if (UIDeviceOrientationIsPortrait(deviceOrientation)) {
+ if ([currentViewDescription portraitMode]) {
+ return (UIInterfaceOrientation)deviceOrientation;
+ } else {
+ return UIInterfaceOrientationLandscapeLeft;
+ }
+ }
+ if (UIDeviceOrientationIsLandscape(deviceOrientation)) {
+ if ([currentViewDescription landscapeMode]) {
+ return (UIInterfaceOrientation)deviceOrientation;
+ } else {
+ return UIInterfaceOrientationPortrait;
+ }
+ }
+ }
return UIInterfaceOrientationPortrait;
}
#define IPHONE_STATUSBAR_HEIGHT 20
- (void)update: (UICompositeViewDescription*) description tabBar:(NSNumber*)tabBar stateBar:(NSNumber*)stateBar fullscreen:(NSNumber*)fullscreen {
-
+
UIViewController *oldContentViewController = self.contentViewController;
UIViewController *oldStateBarViewController = self.stateBarViewController;
UIViewController *oldTabBarViewController = self.tabBarViewController;
diff --git a/Resources/linphonerc b/Resources/linphonerc
index c8122e63d..6812b6238 100644
--- a/Resources/linphonerc
+++ b/Resources/linphonerc
@@ -30,7 +30,6 @@ capture_dev_id=AU: Audio Unit Receiver
eq_active=0
[app]
-rotation_preference=auto
animations_preference=1
edge_opt_preference=0
use_system_contacts=0
diff --git a/Resources/linphonerc~ipad b/Resources/linphonerc~ipad
index 69042e73a..c19045ae8 100644
--- a/Resources/linphonerc~ipad
+++ b/Resources/linphonerc~ipad
@@ -30,7 +30,6 @@ capture_dev_id=AU: Audio Unit Receiver
eq_active=0
[app]
-rotation_preference=auto
animations_preference=1
edge_opt_preference=0
use_system_contacts=0
diff --git a/Settings/InAppSettings.bundle/Advanced.plist b/Settings/InAppSettings.bundle/Advanced.plist
index 9b8e9831a..80632bbb7 100644
--- a/Settings/InAppSettings.bundle/Advanced.plist
+++ b/Settings/InAppSettings.bundle/Advanced.plist
@@ -52,28 +52,6 @@
Type
PSToggleSwitchSpecifier
-
- DefaultValue
- auto
- Key
- rotation_preference
- Title
- Rotation
- Titles
-
- Automatic
- Portrait
- Landscape
-
- Type
- PSMultiValueSpecifier
- Values
-
- auto
- portrait
- landscape
-
-
DefaultValue