Loading telephony/java/android/telephony/TelephonyManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -10038,7 +10038,7 @@ public class TelephonyManager { if (telephony != null) { return telephony.setAllowedNetworkTypesForReason(subId, TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, RadioAccessFamily.getRafFromNetworkType(networkType)); RadioAccessFamily.getRafFromNetworkType(networkType), getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex); Loading Loading @@ -10080,7 +10080,8 @@ public class TelephonyManager { if (telephony != null) { networkTypeBitmask = checkNetworkTypeBitmask(networkTypeBitmask); return telephony.setAllowedNetworkTypesForReason(getSubId(), TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, networkTypeBitmask); TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, networkTypeBitmask, getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setPreferredNetworkTypeBitmask RemoteException", ex); Loading Loading @@ -10134,7 +10135,8 @@ public class TelephonyManager { if (telephony != null) { allowedNetworkTypes = checkNetworkTypeBitmask(allowedNetworkTypes); return telephony.setAllowedNetworkTypesForReason(getSubId(), TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER, allowedNetworkTypes); TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER, allowedNetworkTypes, getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setAllowedNetworkTypes RemoteException", ex); Loading Loading @@ -10240,7 +10242,7 @@ public class TelephonyManager { if (telephony != null) { allowedNetworkTypes = checkNetworkTypeBitmask(allowedNetworkTypes); telephony.setAllowedNetworkTypesForReason(getSubId(), reason, allowedNetworkTypes); allowedNetworkTypes, getOpPackageName()); } else { throw new IllegalStateException("telephony service is null."); } Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -852,9 +852,11 @@ interface ITelephony { * @param subId the id of the subscription. * @param reason the reason the allowed network type change is taking place * @param allowedNetworkTypes the allowed network types. * @param callingPackage the package that changed set the allowed network types. * @return true on success; false on any failure. */ boolean setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes); boolean setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes, String callingPackage); /** * Get the user enabled state of Mobile Data. Loading Loading
telephony/java/android/telephony/TelephonyManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -10038,7 +10038,7 @@ public class TelephonyManager { if (telephony != null) { return telephony.setAllowedNetworkTypesForReason(subId, TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, RadioAccessFamily.getRafFromNetworkType(networkType)); RadioAccessFamily.getRafFromNetworkType(networkType), getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex); Loading Loading @@ -10080,7 +10080,8 @@ public class TelephonyManager { if (telephony != null) { networkTypeBitmask = checkNetworkTypeBitmask(networkTypeBitmask); return telephony.setAllowedNetworkTypesForReason(getSubId(), TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, networkTypeBitmask); TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER, networkTypeBitmask, getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setPreferredNetworkTypeBitmask RemoteException", ex); Loading Loading @@ -10134,7 +10135,8 @@ public class TelephonyManager { if (telephony != null) { allowedNetworkTypes = checkNetworkTypeBitmask(allowedNetworkTypes); return telephony.setAllowedNetworkTypesForReason(getSubId(), TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER, allowedNetworkTypes); TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER, allowedNetworkTypes, getOpPackageName()); } } catch (RemoteException ex) { Rlog.e(TAG, "setAllowedNetworkTypes RemoteException", ex); Loading Loading @@ -10240,7 +10242,7 @@ public class TelephonyManager { if (telephony != null) { allowedNetworkTypes = checkNetworkTypeBitmask(allowedNetworkTypes); telephony.setAllowedNetworkTypesForReason(getSubId(), reason, allowedNetworkTypes); allowedNetworkTypes, getOpPackageName()); } else { throw new IllegalStateException("telephony service is null."); } Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -852,9 +852,11 @@ interface ITelephony { * @param subId the id of the subscription. * @param reason the reason the allowed network type change is taking place * @param allowedNetworkTypes the allowed network types. * @param callingPackage the package that changed set the allowed network types. * @return true on success; false on any failure. */ boolean setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes); boolean setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes, String callingPackage); /** * Get the user enabled state of Mobile Data. Loading