|
|
@ -22,7 +22,7 @@ class OrientationHelper { |
|
|
|
|
|
|
|
|
|
|
|
OrientationHelper(Context context, @NonNull Callback callback) { |
|
|
|
OrientationHelper(Context context, @NonNull Callback callback) { |
|
|
|
mCallback = callback; |
|
|
|
mCallback = callback; |
|
|
|
mListener = new OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) { |
|
|
|
mListener = new OrientationEventListener(context.getApplicationContext(), SensorManager.SENSOR_DELAY_NORMAL) { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onOrientationChanged(int orientation) { |
|
|
|
public void onOrientationChanged(int orientation) { |
|
|
@ -72,4 +72,4 @@ class OrientationHelper { |
|
|
|
int getDisplayOffset() { |
|
|
|
int getDisplayOffset() { |
|
|
|
return mDisplayOffset; |
|
|
|
return mDisplayOffset; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|