Simplify excessively convoluted camera logic

1) QuickCamera logic moved into CameraView

2) The strategies for texture vs. surface view were too complex
   with no observed gain. Better to remove and have to re-add
   if necessary than assume it to be necessary.

3) Drop CWAC-Camera dependency - the device profiles weren't being
   used very much and even that is deprecated so we'd be left on
   our own with new hardware. Not worth it.

4) Selfies first.

5) Layout/orientation mathy logic from CWAC moved into CameraUtils,
   with the  hopes that most of it might be further simplified or
   rendered unnecessary in the future.

Closes #4326

// FREEBIE
This commit is contained in:
Jake McGinty
2015-10-26 17:20:09 -07:00
committed by Moxie Marlinspike
parent 08be47c03e
commit 8fd0ea39aa
15 changed files with 432 additions and 692 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.thoughtcrime.securesms.components.camera.QuickCamera
<org.thoughtcrime.securesms.components.camera.CameraView
android:id="@+id/quick_camera"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -31,7 +31,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#00000000"
android:src="@drawable/quick_camera_front"
android:src="@drawable/quick_camera_rear"
android:padding="20dp"
android:visibility="invisible"
tools:visibility="visible" />

View File

@@ -31,7 +31,7 @@
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:background="#00000000"
android:src="@drawable/quick_camera_front"
android:src="@drawable/quick_camera_rear"
android:padding="20dp"
android:visibility="invisible"
tools:visibility="visible"/>