Loading core/java/android/webkit/DeviceOrientationManager.java→core/java/android/webkit/DeviceMotionAndOrientationManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -17,17 +17,17 @@ package android.webkit; /** * This class is simply a container for the methods used to implement DeviceOrientation, * including the mock DeviceOrientationClient for use in LayoutTests. * This class is simply a container for the methods used to implement DeviceMotion and * DeviceOrientation, including the mock DeviceOrientationClient for use in LayoutTests. * * This could be part of WebViewCore, but have moved it to its own class to * avoid bloat there. * @hide */ public final class DeviceOrientationManager { public final class DeviceMotionAndOrientationManager { private WebViewCore mWebViewCore; public DeviceOrientationManager(WebViewCore webViewCore) { public DeviceMotionAndOrientationManager(WebViewCore webViewCore) { mWebViewCore = webViewCore; } Loading core/java/android/webkit/DeviceMotionService.java +3 −3 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Handler; import android.os.Message; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import java.lang.Runnable; import java.util.List; final class DeviceMotionService implements SensorEventListener { private DeviceOrientationManager mManager; private DeviceMotionAndOrientationManager mManager; private boolean mIsRunning; private Handler mHandler; private SensorManager mSensorManager; Loading @@ -40,7 +40,7 @@ final class DeviceMotionService implements SensorEventListener { private static final int INTERVAL_MILLIS = 100; public DeviceMotionService(DeviceOrientationManager manager, Context context) { public DeviceMotionService(DeviceMotionAndOrientationManager manager, Context context) { mManager = manager; assert(mManager != null); mContext = context; Loading core/java/android/webkit/DeviceOrientationService.java +3 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Handler; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import java.lang.Runnable; import java.util.List; Loading @@ -33,7 +33,7 @@ final class DeviceOrientationService implements SensorEventListener { // The geomagnetic vector expressed in the body frame. private float[] mMagneticFieldVector; private DeviceOrientationManager mManager; private DeviceMotionAndOrientationManager mManager; private boolean mIsRunning; private Handler mHandler; private SensorManager mSensorManager; Loading @@ -45,7 +45,7 @@ final class DeviceOrientationService implements SensorEventListener { private static final double DELTA_DEGRESS = 1.0; public DeviceOrientationService(DeviceOrientationManager manager, Context context) { public DeviceOrientationService(DeviceMotionAndOrientationManager manager, Context context) { mManager = manager; assert(mManager != null); mContext = context; Loading core/java/android/webkit/WebViewCore.java +8 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.view.KeyEvent; import android.view.SurfaceView; import android.view.View; import android.webkit.DeviceMotionService; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import android.webkit.DeviceOrientationService; import java.util.ArrayList; Loading Loading @@ -120,7 +120,8 @@ final class WebViewCore { private int mWebkitScrollX = 0; private int mWebkitScrollY = 0; private DeviceOrientationManager mDeviceOrientationManager = new DeviceOrientationManager(this); private DeviceMotionAndOrientationManager mDeviceMotionAndOrientationManager = new DeviceMotionAndOrientationManager(this); private DeviceMotionService mDeviceMotionService; private DeviceOrientationService mDeviceOrientationService; Loading Loading @@ -2535,19 +2536,19 @@ final class WebViewCore { } private void useMockDeviceOrientation() { mDeviceOrientationManager.useMock(); mDeviceMotionAndOrientationManager.useMock(); } public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha, boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma) { mDeviceOrientationManager.setMockOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma); mDeviceMotionAndOrientationManager.setMockOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma); } protected DeviceMotionService getDeviceMotionService() { if (mDeviceMotionService == null) { mDeviceMotionService = new DeviceMotionService(mDeviceOrientationManager, mContext); new DeviceMotionService(mDeviceMotionAndOrientationManager, mContext); } return mDeviceMotionService; } Loading @@ -2555,7 +2556,7 @@ final class WebViewCore { protected DeviceOrientationService getDeviceOrientationService() { if (mDeviceOrientationService == null) { mDeviceOrientationService = new DeviceOrientationService(mDeviceOrientationManager, mContext); new DeviceOrientationService(mDeviceMotionAndOrientationManager, mContext); } return mDeviceOrientationService; } Loading Loading
core/java/android/webkit/DeviceOrientationManager.java→core/java/android/webkit/DeviceMotionAndOrientationManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -17,17 +17,17 @@ package android.webkit; /** * This class is simply a container for the methods used to implement DeviceOrientation, * including the mock DeviceOrientationClient for use in LayoutTests. * This class is simply a container for the methods used to implement DeviceMotion and * DeviceOrientation, including the mock DeviceOrientationClient for use in LayoutTests. * * This could be part of WebViewCore, but have moved it to its own class to * avoid bloat there. * @hide */ public final class DeviceOrientationManager { public final class DeviceMotionAndOrientationManager { private WebViewCore mWebViewCore; public DeviceOrientationManager(WebViewCore webViewCore) { public DeviceMotionAndOrientationManager(WebViewCore webViewCore) { mWebViewCore = webViewCore; } Loading
core/java/android/webkit/DeviceMotionService.java +3 −3 Original line number Diff line number Diff line Loading @@ -23,13 +23,13 @@ import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Handler; import android.os.Message; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import java.lang.Runnable; import java.util.List; final class DeviceMotionService implements SensorEventListener { private DeviceOrientationManager mManager; private DeviceMotionAndOrientationManager mManager; private boolean mIsRunning; private Handler mHandler; private SensorManager mSensorManager; Loading @@ -40,7 +40,7 @@ final class DeviceMotionService implements SensorEventListener { private static final int INTERVAL_MILLIS = 100; public DeviceMotionService(DeviceOrientationManager manager, Context context) { public DeviceMotionService(DeviceMotionAndOrientationManager manager, Context context) { mManager = manager; assert(mManager != null); mContext = context; Loading
core/java/android/webkit/DeviceOrientationService.java +3 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Handler; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import java.lang.Runnable; import java.util.List; Loading @@ -33,7 +33,7 @@ final class DeviceOrientationService implements SensorEventListener { // The geomagnetic vector expressed in the body frame. private float[] mMagneticFieldVector; private DeviceOrientationManager mManager; private DeviceMotionAndOrientationManager mManager; private boolean mIsRunning; private Handler mHandler; private SensorManager mSensorManager; Loading @@ -45,7 +45,7 @@ final class DeviceOrientationService implements SensorEventListener { private static final double DELTA_DEGRESS = 1.0; public DeviceOrientationService(DeviceOrientationManager manager, Context context) { public DeviceOrientationService(DeviceMotionAndOrientationManager manager, Context context) { mManager = manager; assert(mManager != null); mContext = context; Loading
core/java/android/webkit/WebViewCore.java +8 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.view.KeyEvent; import android.view.SurfaceView; import android.view.View; import android.webkit.DeviceMotionService; import android.webkit.DeviceOrientationManager; import android.webkit.DeviceMotionAndOrientationManager; import android.webkit.DeviceOrientationService; import java.util.ArrayList; Loading Loading @@ -120,7 +120,8 @@ final class WebViewCore { private int mWebkitScrollX = 0; private int mWebkitScrollY = 0; private DeviceOrientationManager mDeviceOrientationManager = new DeviceOrientationManager(this); private DeviceMotionAndOrientationManager mDeviceMotionAndOrientationManager = new DeviceMotionAndOrientationManager(this); private DeviceMotionService mDeviceMotionService; private DeviceOrientationService mDeviceOrientationService; Loading Loading @@ -2535,19 +2536,19 @@ final class WebViewCore { } private void useMockDeviceOrientation() { mDeviceOrientationManager.useMock(); mDeviceMotionAndOrientationManager.useMock(); } public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha, boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma) { mDeviceOrientationManager.setMockOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma); mDeviceMotionAndOrientationManager.setMockOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma); } protected DeviceMotionService getDeviceMotionService() { if (mDeviceMotionService == null) { mDeviceMotionService = new DeviceMotionService(mDeviceOrientationManager, mContext); new DeviceMotionService(mDeviceMotionAndOrientationManager, mContext); } return mDeviceMotionService; } Loading @@ -2555,7 +2556,7 @@ final class WebViewCore { protected DeviceOrientationService getDeviceOrientationService() { if (mDeviceOrientationService == null) { mDeviceOrientationService = new DeviceOrientationService(mDeviceOrientationManager, mContext); new DeviceOrientationService(mDeviceMotionAndOrientationManager, mContext); } return mDeviceOrientationService; } Loading