• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /**
24  * Non-interactive preference that displays a horizontal divider.
25  */
26 class AutoDividerPreference : Preference {
27     constructor(
28         context: Context?,
29         attrs: AttributeSet?,
30         defStyleAttr: Int,
31         defStyleRes: Int
32     ) : super(context!!, attrs, defStyleAttr, defStyleRes) {
33         init()
34     }
35 
36     constructor(
37         context: Context?,
38         attrs: AttributeSet?,
39         defStyleAttr: Int
40     ) : super(context!!, attrs, defStyleAttr) {
41         init()
42     }
43 
44     constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {
45         init()
46     }
47 
48     constructor(context: Context?) : super(context!!) {
49         init()
50     }
51 
initnull52     private fun init() {
53         layoutResource = R.layout.car_divider_preference
54         isSelectable = false
55     }
56 }
57