- Set a variable to record the status then replace getAvailabilityStatus() with it. Test: manual test, use command to run MobileNetworkSettings and record it. Bug: 154061428 Change-Id: Ia13a75a3821bb6c17d0dfeffb5043f47b60adf61
39 lines
1.2 KiB
Java
39 lines
1.2 KiB
Java
/*
|
|
* Copyright (C) 2020 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.
|
|
*/
|
|
|
|
/**
|
|
* Interface letting {@link TelephonyTogglePreferenceController and
|
|
* @link TelephonyBasePreferenceController} can handle availability status.
|
|
*/
|
|
package com.android.settings.network.telephony;
|
|
|
|
import android.content.Context;
|
|
|
|
public interface TelephonyAvailabilityHandler {
|
|
|
|
/**
|
|
* Set availability to preference controller.
|
|
*/
|
|
public void setAvailabilityStatus(int status);
|
|
|
|
/**
|
|
* Do not set availability, use
|
|
* {@link MobileNetworkUtils#getAvailability(Context, int, TelephonyAvailabilityCallback)}
|
|
* to get the availability.
|
|
*/
|
|
public void unsetAvailabilityStatus(boolean enable);
|
|
}
|