Use deprecated methods to support Android API older than 8

This commit is contained in:
Sylvain Berfini 2012-06-12 17:16:06 +02:00
parent d5cee9f44d
commit 48eeafa0fb
2 changed files with 3 additions and 2 deletions

View file

@ -101,7 +101,8 @@ public class LinphoneActivity extends TabActivity implements ContactPicked
instance = this;
setContentView(R.layout.main);
int rotation = getWindowManager().getDefaultDisplay().getRotation() * 90;
@SuppressWarnings("deprecation")
int rotation = getWindowManager().getDefaultDisplay().getOrientation();
// Inverse landscape rotation to initiate linphoneCore correctly
if (rotation == 270)
rotation = 90;

View file

@ -456,7 +456,7 @@ public class VideoCallActivity extends Activity implements
private void resizePreview() {
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay();
int rotation = display.getRotation();
int rotation = display.getOrientation();
LayoutParams params;
int w, h;