1 /* 2 * Copyright (C) 2022 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 package com.android.systemui.car.privacy; 17 18 import android.content.Context; 19 20 import androidx.annotation.DrawableRes; 21 22 import com.android.car.qc.provider.BaseLocalQCProvider; 23 import com.android.systemui.R; 24 25 /** 26 * A {@link BaseLocalQCProvider} that builds the camera privacy panel. 27 */ 28 public class CameraQcPanel extends SensorQcPanel { 29 30 private static final String SENSOR_NAME = "camera"; 31 private static final String SENSOR_SHORT_NAME = "camera"; 32 private static final String SENSOR_NAME_WITH_FIRST_LETTER_CAPITALIZED = "Camera"; 33 CameraQcPanel(Context context)34 public CameraQcPanel(Context context) { 35 super(context); 36 } 37 38 @Override getSensorShortName()39 protected String getSensorShortName() { 40 return SENSOR_SHORT_NAME; 41 } 42 43 @Override getSensorName()44 protected String getSensorName() { 45 return SENSOR_NAME; 46 } 47 48 @Override getSensorNameWithFirstLetterCapitalized()49 protected String getSensorNameWithFirstLetterCapitalized() { 50 return SENSOR_NAME_WITH_FIRST_LETTER_CAPITALIZED; 51 } 52 53 @Override getSensorOnIconResourceId()54 protected @DrawableRes int getSensorOnIconResourceId() { 55 return R.drawable.ic_camera_light; 56 } 57 58 @Override getSensorOffIconResourceId()59 protected @DrawableRes int getSensorOffIconResourceId() { 60 return R.drawable.ic_camera_off_light; 61 } 62 } 63