Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3107aa1 authored by Jack Yu's avatar Jack Yu
Browse files

Added more debug messages for 5G disablement

Added local log to track which packages call
setAllowedNetworkTypesForReason.

Bug: 438916975
Flag: EXEMPT debug message only
Test: Manually verified bugreport
Change-Id: I0812050f43282e039ac6ef636b3c8130c9c9bd2d
parent 85ed67cc
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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);
@@ -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);
@@ -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);
@@ -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.");
            }
+3 −1
Original line number Diff line number Diff line
@@ -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.