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

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

Merge "Revert "Use location access for recent location apps."" into sc-dev

parents a1615409 5da4f381
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -22,10 +22,16 @@
    settings:keywords="@string/keywords_location">

    <PreferenceCategory
        android:key="recent_location_access"
        android:title="@string/location_category_recent_location_access"
        settings:controller=
            "com.android.settings.location.RecentLocationAccessPreferenceController"/>
        android:key="recent_location_requests"
        android:title="@string/location_category_recent_location_requests"
        settings:controller="com.android.settings.location.RecentLocationRequestPreferenceController"/>

    <Preference
        android:key="recent_location_requests_see_all_button"
        android:title="@string/location_recent_location_requests_see_all"
        android:icon="@drawable/ic_chevron_right_24dp"
        android:fragment="com.android.settings.location.RecentLocationRequestSeeAllFragment"
        settings:searchable="false"/>

    <PreferenceCategory
        android:key="location_advanced_settings"
+8 −2
Original line number Diff line number Diff line
@@ -25,8 +25,14 @@
    <PreferenceCategory
        android:key="recent_location_requests"
        android:title="@string/location_category_recent_location_requests"
        settings:controller=
            "com.android.settings.location.RecentLocationAccessPreferenceController"/>
        settings:controller="com.android.settings.location.RecentLocationRequestPreferenceController"/>

    <Preference
        android:key="recent_location_requests_see_all_button"
        android:title="@string/location_recent_location_requests_see_all"
        android:icon="@drawable/ic_chevron_right_24dp"
        android:fragment="com.android.settings.location.RecentLocationRequestSeeAllFragment"
        settings:searchable="false"/>

    <!-- This preference category gets removed if new_recent_location_ui is disabled -->
    <Preference
+10 −2
Original line number Diff line number Diff line
@@ -25,8 +25,16 @@
    <PreferenceCategory
        android:key="recent_location_requests"
        android:title="@string/location_category_recent_location_requests"
        settings:controller=
            "com.android.settings.location.RecentLocationAccessPreferenceController"/>
        settings:controller="com.android.settings.location.RecentLocationRequestPreferenceController"/>

    <Preference
        android:key="recent_location_requests_see_all_button"
        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
        android:key="managed_profile_location_switch"
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class LocationSettings extends DashboardFragment {
        super.onAttach(context);

        use(AppLocationPermissionPreferenceController.class).init(this);
        use(RecentLocationAccessPreferenceController.class).init(this);
        use(RecentLocationRequestPreferenceController.class).init(this);
        use(LocationServicePreferenceController.class).init(this);
        use(LocationFooterPreferenceController.class).init(this);
        use(LocationForWorkPreferenceController.class).init(this);
+5 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;

import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;

/**
 * Location Setting page for managed profile.
@@ -53,9 +54,11 @@ public class LocationWorkProfileSettings extends DashboardFragment {
        use(LocationFooterPreferenceController.class).init(this);
        use(LocationForWorkPreferenceController.class).init(this);

        final RecentLocationAccessPreferenceController controller =
                use(RecentLocationAccessPreferenceController.class);
        final int profileType = getArguments().getInt(ProfileSelectFragment.EXTRA_PROFILE);
        final RecentLocationRequestPreferenceController controller = use(
                RecentLocationRequestPreferenceController.class);
        controller.init(this);
        controller.setProfileType(profileType);
    }

    @Override
Loading