Skip to content

Commit 93289ad

Browse files
committed
Deprecate Camera2Basic
- Deprecate old Camera2Basic - Replace Camera2Basic with Camera2Formats sample Change-Id: I1dadc9a054b58748b9220ddc56b0b61f38606dad
1 parent 95969bb commit 93289ad

File tree

108 files changed

+32
-4031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+32
-4031
lines changed

Camera2Formats/.google/packaging.yaml renamed to Camera2Basic/.google/packaging.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
status: PUBLISHED
88
technologies: [Android]
99
categories: [Camera]
10-
languages: [Java]
10+
languages: [Kotlin]
1111
solutions: [Mobile]
1212
github: android/camera
1313
level: INTERMEDIATE

Camera2Formats/README.md renamed to Camera2Basic/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
Android Camera2Formats Sample
3-
=============================
2+
Android Camera2Basic Sample
3+
===========================
44

55
This sample demonstrates using the Camera2 API to capture a JPEG, DEPTH or RAW frame.
66
Check the source code to see a simple example of how to display the camera preview

Camera2Formats/app/build.gradle renamed to Camera2Basic/app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424
compileSdkVersion 29
2525
defaultConfig {
2626
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
27-
applicationId "com.android.example.camera2.formats"
27+
applicationId "com.android.example.camera2.basic"
2828
minSdkVersion 21
2929
targetSdkVersion 29
3030
versionCode 1
@@ -68,7 +68,7 @@ dependencies {
6868
// Kotlin lang
6969
implementation 'androidx.core:core-ktx:1.1.0'
7070
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
71-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
71+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
7272

7373
// App compat and UI things
7474
implementation 'androidx.appcompat:appcompat:1.1.0'
@@ -84,8 +84,8 @@ dependencies {
8484
implementation 'androidx.exifinterface:exifinterface:1.1.0'
8585

8686
// Glide
87-
implementation 'com.github.bumptech.glide:glide:4.10.0'
88-
kapt 'com.github.bumptech.glide:compiler:4.10.0'
87+
implementation 'com.github.bumptech.glide:glide:4.11.0'
88+
kapt 'com.github.bumptech.glide:compiler:4.11.0'
8989

9090
// Unit testing
9191
testImplementation 'androidx.test.ext:junit:1.1.1'

Camera2Formats/app/src/main/AndroidManifest.xml renamed to Camera2Basic/app/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
-->
1717
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:tools="http://schemas.android.com/tools"
19-
package="com.example.android.camera2.formats">
19+
package="com.example.android.camera2.basic">
2020

2121
<!-- Permission declarations -->
2222
<uses-permission android:name="android.permission.CAMERA" />
@@ -33,7 +33,7 @@
3333
tools:ignore="GoogleAppIndexingWarning">
3434

3535
<activity
36-
android:name=".CameraActivity"
36+
android:name="com.example.android.camera2.basic.CameraActivity"
3737
android:clearTaskOnLaunch="true"
3838
android:theme="@style/AppTheme">
3939

Camera2Formats/app/src/main/java/com/example/android/camera2/formats/CameraActivity.kt renamed to Camera2Basic/app/src/main/java/com/example/android/camera2/basic/CameraActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats
17+
package com.example.android.camera2.basic
1818

1919
import android.os.Bundle
2020
import android.view.View
+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats.fragments
17+
package com.example.android.camera2.basic.fragments
1818

1919
import android.annotation.SuppressLint
2020
import android.content.Context
@@ -51,7 +51,7 @@ import com.example.android.camera2.common.computeExifOrientation
5151
import com.example.android.camera2.common.getPreviewOutputSize
5252
import com.example.android.camera2.common.AutoFitSurfaceView
5353
import com.example.android.camera2.common.OrientationLiveData
54-
import com.example.android.camera2.formats.R
54+
import com.example.android.camera2.basic.R
5555
import kotlinx.coroutines.Dispatchers
5656
import kotlinx.coroutines.launch
5757
import kotlinx.coroutines.suspendCancellableCoroutine
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats.fragments
17+
package com.example.android.camera2.basic.fragments
1818

1919
import android.graphics.Bitmap
2020
import android.graphics.BitmapFactory
+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats.fragments
17+
package com.example.android.camera2.basic.fragments
1818

1919
import android.Manifest
2020
import android.content.Context
@@ -24,7 +24,7 @@ import android.widget.Toast
2424
import androidx.core.content.ContextCompat
2525
import androidx.fragment.app.Fragment
2626
import androidx.navigation.Navigation
27-
import com.example.android.camera2.formats.R
27+
import com.example.android.camera2.basic.R
2828

2929
private const val PERMISSIONS_REQUEST_CODE = 10
3030
private val PERMISSIONS_REQUIRED = arrayOf(Manifest.permission.CAMERA)
+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats.fragments
17+
package com.example.android.camera2.basic.fragments
1818

1919
import android.annotation.SuppressLint
2020
import android.content.Context
@@ -32,7 +32,7 @@ import androidx.navigation.Navigation
3232
import androidx.recyclerview.widget.LinearLayoutManager
3333
import androidx.recyclerview.widget.RecyclerView
3434
import com.example.android.camera2.common.GenericListAdapter
35-
import com.example.android.camera2.formats.R
35+
import com.example.android.camera2.basic.R
3636

3737
class SelectorFragment : Fragment() {
3838

Camera2Formats/app/src/main/res/navigation/nav_graph.xml renamed to Camera2Basic/app/src/main/res/navigation/nav_graph.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<fragment
2424
android:id="@+id/permissions_fragment"
25-
android:name="com.example.android.camera2.formats.fragments.PermissionsFragment"
25+
android:name="com.example.android.camera2.basic.fragments.PermissionsFragment"
2626
android:label="Permissions" >
2727

2828
<action
@@ -35,7 +35,7 @@
3535

3636
<fragment
3737
android:id="@+id/selector_fragment"
38-
android:name="com.example.android.camera2.formats.fragments.SelectorFragment"
38+
android:name="com.example.android.camera2.basic.fragments.SelectorFragment"
3939
android:label="Selector" >
4040

4141
<action
@@ -47,7 +47,7 @@
4747

4848
<fragment
4949
android:id="@+id/camera_fragment"
50-
android:name="com.example.android.camera2.formats.fragments.CameraFragment"
50+
android:name="com.example.android.camera2.basic.fragments.CameraFragment"
5151
android:label="Camera" >
5252

5353
<argument
@@ -75,7 +75,7 @@
7575

7676
<fragment
7777
android:id="@+id/image_viewer_fragment"
78-
android:name="com.example.android.camera2.formats.fragments.ImageViewerFragment"
78+
android:name="com.example.android.camera2.basic.fragments.ImageViewerFragment"
7979
android:label="Image Viewer" >
8080

8181
<argument

Camera2Formats/app/src/main/res/values/strings.xml renamed to Camera2Basic/app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
limitations under the License.
1515
-->
1616
<resources>
17-
<string name="app_name">Camera2Formats</string>
17+
<string name="app_name">Camera2Basic</string>
1818
</resources>

Camera2Formats/app/src/test/java/com/example/android/camera2/formats/InstrumentedTests.kt renamed to Camera2Basic/app/src/test/java/com/example/android/camera2/basic/InstrumentedTests.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.android.camera2.formats
17+
package com.example.android.camera2.basic
1818

1919
import android.Manifest
2020
import android.content.Context
@@ -41,6 +41,6 @@ class MainInstrumentedTest {
4141
fun useAppContext() {
4242
// Context of the app under test
4343
val context = ApplicationProvider.getApplicationContext() as Context
44-
assertEquals("com.android.example.camera2formats", context.packageName)
44+
assertEquals("com.android.example.camera2.basic", context.packageName)
4545
}
4646
}

Camera2Formats/build.gradle renamed to Camera2Basic/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ buildscript {
2626
jcenter()
2727
}
2828
dependencies {
29-
classpath 'com.android.tools.build:gradle:3.5.1'
29+
classpath 'com.android.tools.build:gradle:3.5.3'
3030
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
3131
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
3232

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Camera2BasicJava/.google/packaging.yaml

-23
This file was deleted.

Camera2BasicJava/Application/build.gradle

-68
This file was deleted.

Camera2BasicJava/Application/src/main/AndroidManifest.xml

-40
This file was deleted.

0 commit comments

Comments
 (0)