Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23dbbd27 authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge "New onViewCreated in AbstractPreferenceController" into udc-qpr-dev

parents 751a3079 d78f2de0
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.settingslib.core;

import android.app.admin.DevicePolicyManager;
@@ -6,8 +22,11 @@ import android.os.Build;
import android.text.TextUtils;
import android.util.Log;

import androidx.annotation.EmptySuper;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.core.os.BuildCompat;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceScreen;
@@ -51,6 +70,13 @@ public abstract class AbstractPreferenceController {
        }
    }

    /**
     * Called on view created.
     */
    @EmptySuper
    public void onViewCreated(@NonNull LifecycleOwner viewLifecycleOwner) {
    }

    /**
     * Updates the current status of preference (summary, switch state, etc)
     */