|
| 1 | +package com.android.internal.telephony; |
| 2 | + |
| 3 | +import android.os.Binder; |
| 4 | +import android.os.Build; |
| 5 | +import android.os.IBinder; |
| 6 | +import android.os.IInterface; |
| 7 | + |
| 8 | +import androidx.annotation.DeprecatedSinceApi; |
| 9 | +import androidx.annotation.RequiresApi; |
| 10 | + |
| 11 | +public interface ITelephony extends IInterface { |
| 12 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.P) |
| 13 | + void setDataEnabled(int subId, boolean enable); |
| 14 | + |
| 15 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.P) |
| 16 | + boolean getDataEnabled(int subId); |
| 17 | + |
| 18 | + @RequiresApi(api = Build.VERSION_CODES.P) |
| 19 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.S) |
| 20 | + void setUserDataEnabled(int subId, boolean enable); |
| 21 | + |
| 22 | + @RequiresApi(api = Build.VERSION_CODES.P) |
| 23 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.S) |
| 24 | + boolean isUserDataEnabled(int subId); |
| 25 | + |
| 26 | + @RequiresApi(api = Build.VERSION_CODES.S) |
| 27 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.TIRAMISU) |
| 28 | + void setDataEnabledForReason(int subId, int reason, boolean enable); |
| 29 | + |
| 30 | + @RequiresApi(api = Build.VERSION_CODES.S) |
| 31 | + boolean isDataEnabledForReason(int subId, int reason); |
| 32 | + |
| 33 | + @RequiresApi(api = Build.VERSION_CODES.TIRAMISU) |
| 34 | + void setDataEnabledForReason(int subId, int reason, boolean enable, String callingPackage); |
| 35 | + |
| 36 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.TIRAMISU) |
| 37 | + boolean enableDataConnectivity(); |
| 38 | + |
| 39 | + @DeprecatedSinceApi(api = Build.VERSION_CODES.TIRAMISU) |
| 40 | + boolean disableDataConnectivity(); |
| 41 | + |
| 42 | + @RequiresApi(api = Build.VERSION_CODES.TIRAMISU) |
| 43 | + boolean enableDataConnectivity(String callingPackage); |
| 44 | + |
| 45 | + @RequiresApi(api = Build.VERSION_CODES.TIRAMISU) |
| 46 | + boolean disableDataConnectivity(String callingPackage); |
| 47 | + |
| 48 | + abstract class Stub extends Binder implements ITelephony { |
| 49 | + public static ITelephony asInterface(IBinder obj) { |
| 50 | + throw new RuntimeException("Stub!"); |
| 51 | + } |
| 52 | + } |
| 53 | +} |
0 commit comments