1 /*
2  * Copyright (C) 2021 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.permissioncontroller.permission.ui.auto
17 
18 import android.content.Context
19 import android.util.AttributeSet
20 import androidx.preference.Preference
21 import com.android.permissioncontroller.R
22 
23 /** Non-interactive preference that displays a horizontal divider. */
24 class AutoDividerPreference : Preference {
25     constructor(
26         context: Context?,
27         attrs: AttributeSet?,
28         defStyleAttr: Int,
29         defStyleRes: Int
30     ) : super(context!!, attrs, defStyleAttr, defStyleRes) {
31         init()
32     }
33 
34     constructor(
35         context: Context?,
36         attrs: AttributeSet?,
37         defStyleAttr: Int
38     ) : super(context!!, attrs, defStyleAttr) {
39         init()
40     }
41 
42     constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {
43         init()
44     }
45 
46     constructor(context: Context?) : super(context!!) {
47         init()
48     }
49 
initnull50     private fun init() {
51         layoutResource = R.layout.car_divider_preference
52         isSelectable = false
53     }
54 }
55