Separate personal/work tab in LocationSettings

- Add LocationPersonalSettings for personal location Settings
- Add LocationWorkProfileSettings for workprofile location settings

Bug: 141601408
Test: manual
Change-Id: Iaaa3a1db5abe02881c4d8afdaec1013ab5552eb3
This commit is contained in:
Raff Tsai
2019-11-22 16:36:21 +08:00
parent 2229585e88
commit 5089629bf5
14 changed files with 403 additions and 41 deletions

View File

@@ -0,0 +1,61 @@
/*
* 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.
*/
package com.android.settings.location;
import android.app.settings.SettingsEnums;
import android.content.Context;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
/**
* Location Setting page for personal profile.
*/
public class LocationPersonalSettings extends DashboardFragment {
private static final String TAG = "LocationPersonal";
@Override
public int getMetricsCategory() {
return SettingsEnums.LOCATION;
}
@Override
protected int getPreferenceScreenResId() {
return R.xml.location_settings_personal;
}
@Override
protected String getLogTag() {
return TAG;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
use(AppLocationPermissionPreferenceController.class).init(this);
use(RecentLocationRequestPreferenceController.class).init(this);
use(LocationServicePreferenceController.class).init(this);
use(LocationFooterPreferenceController.class).init(this);
}
@Override
public int getHelpResource() {
return R.string.help_url_location_access;
}
}