Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 | |
| 17 | package android.hardware.camera2.params; |
| 18 | |
| 19 | import android.os.Parcel; |
| 20 | import android.os.Parcelable; |
| 21 | import android.util.Log; |
| 22 | |
| 23 | /** |
| 24 | * A class for describing the vendor tag cache 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 | */ |
| 30 | public final class VendorTagDescriptorCache implements Parcelable { |
| 31 | |
| 32 | private VendorTagDescriptorCache(Parcel source) { |
| 33 | } |
| 34 | |
Jeff Sharkey | 9e8f83d | 2019-02-28 12:06:45 -0700 | [diff] [blame] | 35 | public static final @android.annotation.NonNull Parcelable.Creator<VendorTagDescriptorCache> CREATOR = |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 36 | new Parcelable.Creator<VendorTagDescriptorCache>() { |
| 37 | @Override |
| 38 | public VendorTagDescriptorCache createFromParcel(Parcel source) { |
| 39 | try { |
| 40 | VendorTagDescriptorCache vendorDescriptorCache = new VendorTagDescriptorCache(source); |
| 41 | return vendorDescriptorCache; |
| 42 | } catch (Exception e) { |
| 43 | Log.e(TAG, "Exception creating VendorTagDescriptorCache from parcel", e); |
| 44 | return null; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public VendorTagDescriptorCache[] newArray(int size) { |
| 50 | return new VendorTagDescriptorCache[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 = "VendorTagDescriptorCache"; |
| 67 | } |