blob: 4845ec3e3bd8f841cb715e9f63253a34030e999e [file] [log] [blame]
Eino-Ville Talvala5d2d7782015-12-17 16:50:50 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.camera2.params;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21import android.util.Log;
22
23/**
24 * A class for describing the vendor tags declared by a camera HAL module.
25 * Generally only used by the native side of
26 * android.hardware.camera2.impl.CameraMetadataNative
27 *
28 * @hide
29 */
30public final class VendorTagDescriptor implements Parcelable {
31
32 private VendorTagDescriptor(Parcel source) {
33 }
34
Jeff Sharkey9e8f83d2019-02-28 12:06:45 -070035 public static final @android.annotation.NonNull Parcelable.Creator<VendorTagDescriptor> CREATOR =
Eino-Ville Talvala5d2d7782015-12-17 16:50:50 -080036 new Parcelable.Creator<VendorTagDescriptor>() {
37 @Override
38 public VendorTagDescriptor createFromParcel(Parcel source) {
39 try {
40 VendorTagDescriptor vendorDescriptor = new VendorTagDescriptor(source);
41 return vendorDescriptor;
42 } catch (Exception e) {
43 Log.e(TAG, "Exception creating VendorTagDescriptor from parcel", e);
44 return null;
45 }
46 }
47
48 @Override
49 public VendorTagDescriptor[] newArray(int size) {
50 return new VendorTagDescriptor[size];
51 }
52 };
53
54 @Override
55 public int describeContents() {
56 return 0;
57 }
58
59 @Override
60 public void writeToParcel(Parcel dest, int flags) {
61 if (dest == null) {
62 throw new IllegalArgumentException("dest must not be null");
63 }
64 }
65
66 private static final String TAG = "VendorTagDescriptor";
67}