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

Commit 69faf046 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix sketchy usage of new PreferenceScreen" into oc-dev

parents d70abb53 76f46fc8
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2017 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.
  -->

<PreferenceScreen />
+1 −2
Original line number Diff line number Diff line
@@ -184,8 +184,7 @@ public class ApnSettings extends RestrictedSettingsFragment implements
        mUnavailable = isUiRestricted();
        setHasOptionsMenu(!mUnavailable);
        if (mUnavailable) {
            setPreferenceScreen(new PreferenceScreen(getPrefContext(), null));
            getPreferenceScreen().removeAll();
            addPreferencesFromResource(R.xml.empty_settings);
            return;
        }

+1 −1
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
            // Block access to developer options if the user is not the owner, if user policy
            // restricts it, or if the device has not been provisioned
            mUnavailable = true;
            setPreferenceScreen(new PreferenceScreen(getPrefContext(), null));
            addPreferencesFromResource(R.xml.empty_settings);
            return;
        }