1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.systemui.statusbar.connectivity; 18 19 import com.android.settingslib.net.DataUsageController; 20 import com.android.systemui.demomode.DemoMode; 21 import com.android.systemui.statusbar.policy.CallbackController; 22 import com.android.systemui.statusbar.policy.DataSaverController; 23 24 /** */ 25 public interface NetworkController extends CallbackController<SignalCallback>, DemoMode { 26 /** */ hasMobileDataFeature()27 boolean hasMobileDataFeature(); 28 /** */ setWifiEnabled(boolean enabled)29 void setWifiEnabled(boolean enabled); 30 /** */ getAccessPointController()31 AccessPointController getAccessPointController(); 32 /** */ getMobileDataController()33 DataUsageController getMobileDataController(); 34 /** */ getDataSaverController()35 DataSaverController getDataSaverController(); 36 /** */ getMobileDataNetworkName()37 String getMobileDataNetworkName(); 38 /** */ isMobileDataNetworkInService()39 boolean isMobileDataNetworkInService(); 40 /** */ getNumberSubscriptions()41 int getNumberSubscriptions(); 42 43 /** */ hasVoiceCallingFeature()44 boolean hasVoiceCallingFeature(); 45 46 /** */ addEmergencyListener(EmergencyListener listener)47 void addEmergencyListener(EmergencyListener listener); 48 /** */ removeEmergencyListener(EmergencyListener listener)49 void removeEmergencyListener(EmergencyListener listener); 50 51 /** */ isRadioOn()52 boolean isRadioOn(); 53 54 /** */ 55 interface EmergencyListener { setEmergencyCallsOnly(boolean emergencyOnly)56 void setEmergencyCallsOnly(boolean emergencyOnly); 57 } 58 } 59