Use deprecated methods to support Android API older than 8
This commit is contained in:
parent
d5cee9f44d
commit
48eeafa0fb
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue