mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-25 16:17:21 +00:00
parent
a04e737526
commit
3a5d4e7ebe
@ -34,7 +34,7 @@ import android.support.annotation.Nullable;
|
|||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.OrientationEventListener;
|
import android.view.OrientationEventListener;
|
||||||
import android.widget.FrameLayout;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -49,7 +49,7 @@ import org.whispersystems.jobqueue.JobParameters;
|
|||||||
import org.whispersystems.libaxolotl.util.guava.Optional;
|
import org.whispersystems.libaxolotl.util.guava.Optional;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class CameraView extends FrameLayout {
|
public class CameraView extends ViewGroup {
|
||||||
private static final String TAG = CameraView.class.getSimpleName();
|
private static final String TAG = CameraView.class.getSimpleName();
|
||||||
|
|
||||||
private final CameraSurfaceView surface;
|
private final CameraSurfaceView surface;
|
||||||
@ -162,6 +162,8 @@ public class CameraView extends FrameLayout {
|
|||||||
onOrientationChange.disable();
|
onOrientationChange.disable();
|
||||||
displayOrientation = -1;
|
displayOrientation = -1;
|
||||||
outputOrientation = -1;
|
outputOrientation = -1;
|
||||||
|
removeView(surface);
|
||||||
|
addView(surface);
|
||||||
Log.w(TAG, "onPause() completed");
|
Log.w(TAG, "onPause() completed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -284,7 +286,7 @@ public class CameraView extends FrameLayout {
|
|||||||
camera.setPreviewDisplay(surface.getHolder());
|
camera.setPreviewDisplay(surface.getHolder());
|
||||||
startPreview(parameters);
|
startPreview(parameters);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.w(TAG, "couldn't set preview display");
|
Log.w(TAG, "couldn't set preview display", e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user