1e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler/* 2af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock * Copyright (C) 2014 The Android Open Source Project 3e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * 4e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * Licensed under the Apache License, Version 2.0 (the "License"); 5e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * you may not use this file except in compliance with the License. 6e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * You may obtain a copy of the License at 7e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * 8e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * http://www.apache.org/licenses/LICENSE-2.0 9e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * 10e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * Unless required by applicable law or agreed to in writing, software 11e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * distributed under the License is distributed on an "AS IS" BASIS, 12e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * See the License for the specific language governing permissions and 14e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler * limitations under the License. 15e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler */ 16e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler 17e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandlerpackage com.android.systemui.statusbar.policy; 18e40451a89dc91dfd636af7cb32a23b4a4cc93fdcDaniel Sandler 19af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlockpublic interface LocationController { 20af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock boolean isLocationEnabled(); 21af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock boolean setLocationEnabled(boolean enabled); 22af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock void addSettingsChangedCallback(LocationSettingsChangeCallback cb); 23af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock void removeSettingsChangedCallback(LocationSettingsChangeCallback cb); 24d63c59786509aadd6a8d0c5cb45ed696339f16b7Winson Chung 2503ed0127dae141d99b003ede9ba3ea937128e471David Christie /** 2603ed0127dae141d99b003ede9ba3ea937128e471David Christie * A callback for change in location settings (the user has enabled/disabled location). 2703ed0127dae141d99b003ede9ba3ea937128e471David Christie */ 2803ed0127dae141d99b003ede9ba3ea937128e471David Christie public interface LocationSettingsChangeCallback { 2903ed0127dae141d99b003ede9ba3ea937128e471David Christie /** 3003ed0127dae141d99b003ede9ba3ea937128e471David Christie * Called whenever location settings change. 3103ed0127dae141d99b003ede9ba3ea937128e471David Christie * 3203ed0127dae141d99b003ede9ba3ea937128e471David Christie * @param locationEnabled A value of true indicates that at least one type of location 3303ed0127dae141d99b003ede9ba3ea937128e471David Christie * is enabled in settings. 3403ed0127dae141d99b003ede9ba3ea937128e471David Christie */ 35af8d6c44f06d2f8baac2c5774a9efdae3fc36797John Spurlock void onLocationSettingsChanged(boolean locationEnabled); 36c750c1fb83fbdec895e236dda7207db4da14ec49David Christie } 37c750c1fb83fbdec895e236dda7207db4da14ec49David Christie} 38