Merge "Call onViewCreated in DashboardFragment" into udc-qpr-dev am: 8617f63823 am: 5d847e0207
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23659924 Change-Id: I7ae7f969a3d69849c59fdc6e7a7f44f0c8458f87 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -51,7 +51,7 @@ class DataSaverController(context: Context, key: String) : BasePreferenceControl
|
||||
preference = screen.findPreference(preferenceKey)!!
|
||||
}
|
||||
|
||||
fun init(viewLifecycleOwner: LifecycleOwner) {
|
||||
override fun onViewCreated(viewLifecycleOwner: LifecycleOwner) {
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||
preference.summary = getUnrestrictedSummary(mContext)
|
||||
|
||||
@@ -21,10 +21,6 @@ import static android.app.admin.DevicePolicyResources.Strings.Settings.MANAGE_DE
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -50,12 +46,6 @@ public class SpecialAccessSettings extends DashboardFragment {
|
||||
MANAGE_DEVICE_ADMIN_APPS, R.string.manage_device_admin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
use(DataSaverController.class).init(getViewLifecycleOwner());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.special_access;
|
||||
|
||||
Reference in New Issue
Block a user