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

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

Merge "Fix UI issue in LocationSettings"

parents a90c5186 5ec8efe7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@
        <item name="android:showDividers">middle</item>
    </style>

    <style name="TextAppearance.Tab" parent="TextAppearance.Design.Tab">
    <style name="TextAppearance.Tab" parent="@android:style/TextAppearance.DeviceDefault">
        <item name="android:textAllCaps">false</item>
    </style>

+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@
            android:title="@string/spellcheckers_settings_for_work_title"
            android:fragment="com.android.settings.inputmethod.SpellCheckersSettings"
            settings:forWork="true"
            settings:controller="com.android.settings.language.UserDictionaryForWorkPreferenceController" />
            settings:controller="com.android.settings.core.WorkPreferenceController" />

        <Preference
            android:key="user_dictionary_settings_for_work_pref"
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
        android:title="@string/location_recent_location_requests_see_all"
        android:icon="@drawable/ic_chevron_right_24dp"
        android:fragment="com.android.settings.location.RecentLocationRequestSeeAllFragment"
        settings:controller="com.android.settings.core.WorkPreferenceController"
        settings:forWork="true"
        settings:searchable="false"/>

    <com.android.settingslib.RestrictedSwitchPreference

res/xml/storage_summary_donut.xml

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2019 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
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="storage_dashboard_screen"
    android:title="@string/storage_settings"
    android:orderingFromXml="false">
    <com.android.settings.deviceinfo.storage.StorageSummaryDonutPreference
        android:key="pref_summary"
        android:order="0"
        settings:searchable="false"
        settings:controller="com.android.settings.deviceinfo.storage.StorageSummaryDonutPreferenceController"/>
</PreferenceScreen>
 No newline at end of file
+3 −16
Original line number Diff line number Diff line
@@ -191,19 +191,6 @@ public final class Utils extends com.android.settingslib.Utils {
        return false;
    }

    /**
     * Returns the UserManager for a given context
     *
     * @throws IllegalStateException if no UserManager could be retrieved.
     */
    public static UserManager getUserManager(Context context) {
        final UserManager um = UserManager.get(context);
        if (um == null) {
            throw new IllegalStateException("Unable to load UserManager");
        }
        return um;
    }

    /**
     * Returns true if Monkey is running.
     */
@@ -679,7 +666,7 @@ public final class Utils extends com.android.settingslib.Utils {
     * @throws SecurityException if the given userId does not belong to the current user group.
     */
    public static int enforceSameOwner(Context context, int userId) {
        final UserManager um = getUserManager(context);
        final UserManager um = UserManager.get(context);
        final int[] profileIds = um.getProfileIdsWithDisabled(UserHandle.myUserId());
        if (ArrayUtils.contains(profileIds, userId)) {
            return userId;
@@ -699,7 +686,7 @@ public final class Utils extends com.android.settingslib.Utils {
     * Returns the user id of the credential owner of the given user id.
     */
    public static int getCredentialOwnerUserId(Context context, int userId) {
        final UserManager um = getUserManager(context);
        final UserManager um = UserManager.get(context);
        return um.getCredentialOwnerProfile(userId);
    }

@@ -836,7 +823,7 @@ public final class Utils extends com.android.settingslib.Utils {
    }

    public static boolean isDemoUser(Context context) {
        return UserManager.isDeviceInDemoMode(context) && getUserManager(context).isDemoUser();
        return UserManager.isDeviceInDemoMode(context) && UserManager.get(context).isDemoUser();
    }

    public static ComponentName getDeviceOwnerComponent(Context context) {
Loading