Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4de845e authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 625 into donut

* changes:
  fix 1812272 SensorManager method returns hidden object
parents 6fcddb05 287b3092
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import java.util.List;
 * class by calling {@link android.content.Context#getSystemService(java.lang.String)
 * Context.getSystemService()} with an argument of {@link android.content.Context#SENSOR_SERVICE}.
 */
public class SensorManager extends IRotationWatcher.Stub
public class SensorManager
{
    private static final String TAG = "SensorManager";
    private static final float[] mTempMatrix = new float[16];
@@ -475,7 +475,13 @@ public class SensorManager extends IRotationWatcher.Stub
                    // if it's null we're running in the system process
                    // which won't get the rotated values
                    try {
                        sRotation = sWindowManager.watchRotation(this);
                        sRotation = sWindowManager.watchRotation(
                            new IRotationWatcher.Stub() {
                                public void onRotationChanged(int rotation) {
                                    SensorManager.this.onRotationChanged(rotation);
                                }
                            }
                        );
                    } catch (RemoteException e) {
                    }
                }