Fix portrait only option for call activity
This commit is contained in:
parent
473702717e
commit
f4143bf427
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,7 @@ import android.hardware.SensorManager;
|
|||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.PowerManager;
|
||||
import android.os.SystemClock;
|
||||
import android.app.Fragment;
|
||||
|
@ -131,6 +132,10 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
instance = this;
|
||||
|
||||
if (getResources().getBoolean(R.bool.orientation_portrait_only)) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
}
|
||||
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
|
||||
setContentView(R.layout.call);
|
||||
|
|
Loading…
Reference in a new issue