summaryrefslogtreecommitdiff
path: root/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java
diff options
context:
space:
mode:
authorfischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-06 18:40:44 +0000
committerfischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-06 18:40:44 +0000
commiteb70c0e0b16f4ae98621cd6fe830a5921e8d0cdb (patch)
tree796eb0011900cd09a4ec14e0efc7c828b68dba9a /examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java
parentcef4b39b7ec2035a69d46360d8101a785fd154d3 (diff)
downloadtalk-eb70c0e0b16f4ae98621cd6fe830a5921e8d0cdb.tar.gz
AppRTCDemo(android): support app (UI) & capture rotation.
Now app UI rotates as the device orientation changes, and the captured stream tries to maintain real-world-up, matching Chrome/Android and Hangouts/Android behavior. BUG=2432 R=glaznev@webrtc.org, henrike@webrtc.org, wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/15689005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@6354 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java')
-rw-r--r--examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java b/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java
index dea251a..9a3d72e 100644
--- a/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java
+++ b/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java
@@ -31,6 +31,7 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.Point;
import android.media.AudioManager;
@@ -226,6 +227,13 @@ public class AppRTCDemoActivity extends Activity
}
}
+ @Override
+ public void onConfigurationChanged (Configuration newConfig) {
+ Point displaySize = new Point();
+ getWindowManager().getDefaultDisplay().getSize(displaySize);
+ vsv.updateDisplaySize(displaySize);
+ super.onConfigurationChanged(newConfig);
+ }
// Just for fun (and to regression-test bug 2302) make sure that DataChannels
// can be created, queried, and disposed.