Search in sources :

Example 1 with ICarrierConfigLoader

use of com.android.internal.telephony.ICarrierConfigLoader in project android_frameworks_base by ResurrectionRemix.

the class CarrierConfigManager method updateConfigForPhoneId.

/**
     * Request the carrier config loader to update the cofig for phoneId.
     * <p>
     * Depending on simState, the config may be cleared or loaded from config app. This is only used
     * by SubscriptionInfoUpdater.
     * </p>
     *
     * @hide
     */
@SystemApi
public void updateConfigForPhoneId(int phoneId, String simState) {
    try {
        ICarrierConfigLoader loader = getICarrierConfigLoader();
        if (loader == null) {
            Rlog.w(TAG, "Error updating config for phoneId=" + phoneId + " ICarrierConfigLoader is null");
            return;
        }
        loader.updateConfigForPhoneId(phoneId, simState);
    } catch (RemoteException ex) {
        Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString());
    }
}
Also used : ICarrierConfigLoader(com.android.internal.telephony.ICarrierConfigLoader) RemoteException(android.os.RemoteException) SystemApi(android.annotation.SystemApi)

Example 2 with ICarrierConfigLoader

use of com.android.internal.telephony.ICarrierConfigLoader in project android_frameworks_base by DirtyUnicorns.

the class CarrierConfigManager method updateConfigForPhoneId.

/**
     * Request the carrier config loader to update the cofig for phoneId.
     * <p>
     * Depending on simState, the config may be cleared or loaded from config app. This is only used
     * by SubscriptionInfoUpdater.
     * </p>
     *
     * @hide
     */
@SystemApi
public void updateConfigForPhoneId(int phoneId, String simState) {
    try {
        ICarrierConfigLoader loader = getICarrierConfigLoader();
        if (loader == null) {
            Rlog.w(TAG, "Error updating config for phoneId=" + phoneId + " ICarrierConfigLoader is null");
            return;
        }
        loader.updateConfigForPhoneId(phoneId, simState);
    } catch (RemoteException ex) {
        Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString());
    }
}
Also used : ICarrierConfigLoader(com.android.internal.telephony.ICarrierConfigLoader) RemoteException(android.os.RemoteException) SystemApi(android.annotation.SystemApi)

Example 3 with ICarrierConfigLoader

use of com.android.internal.telephony.ICarrierConfigLoader in project android_frameworks_base by DirtyUnicorns.

the class CarrierConfigManager method notifyConfigChangedForSubId.

/**
     * Calling this method triggers telephony services to fetch the current carrier configuration.
     * <p>
     * Normally this does not need to be called because the platform reloads config on its own.
     * This should be called by a carrier service app if it wants to update config at an arbitrary
     * moment.
     * </p>
     * <p>Requires that the calling app has carrier privileges.
     * <p>
     * This method returns before the reload has completed, and
     * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an
     * arbitrary thread.
     * </p>
     * @see #hasCarrierPrivileges
     */
public void notifyConfigChangedForSubId(int subId) {
    try {
        ICarrierConfigLoader loader = getICarrierConfigLoader();
        if (loader == null) {
            Rlog.w(TAG, "Error reloading config for subId=" + subId + " ICarrierConfigLoader is null");
            return;
        }
        loader.notifyConfigChangedForSubId(subId);
    } catch (RemoteException ex) {
        Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex.toString());
    }
}
Also used : ICarrierConfigLoader(com.android.internal.telephony.ICarrierConfigLoader) RemoteException(android.os.RemoteException)

Example 4 with ICarrierConfigLoader

use of com.android.internal.telephony.ICarrierConfigLoader in project platform_frameworks_base by android.

the class CarrierConfigManager method updateConfigForPhoneId.

/**
     * Request the carrier config loader to update the cofig for phoneId.
     * <p>
     * Depending on simState, the config may be cleared or loaded from config app. This is only used
     * by SubscriptionInfoUpdater.
     * </p>
     *
     * @hide
     */
@SystemApi
public void updateConfigForPhoneId(int phoneId, String simState) {
    try {
        ICarrierConfigLoader loader = getICarrierConfigLoader();
        if (loader == null) {
            Rlog.w(TAG, "Error updating config for phoneId=" + phoneId + " ICarrierConfigLoader is null");
            return;
        }
        loader.updateConfigForPhoneId(phoneId, simState);
    } catch (RemoteException ex) {
        Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString());
    }
}
Also used : ICarrierConfigLoader(com.android.internal.telephony.ICarrierConfigLoader) RemoteException(android.os.RemoteException) SystemApi(android.annotation.SystemApi)

Example 5 with ICarrierConfigLoader

use of com.android.internal.telephony.ICarrierConfigLoader in project platform_frameworks_base by android.

the class CarrierConfigManager method notifyConfigChangedForSubId.

/**
     * Calling this method triggers telephony services to fetch the current carrier configuration.
     * <p>
     * Normally this does not need to be called because the platform reloads config on its own.
     * This should be called by a carrier service app if it wants to update config at an arbitrary
     * moment.
     * </p>
     * <p>Requires that the calling app has carrier privileges.
     * @see #hasCarrierPrivileges
     * <p>
     * This method returns before the reload has completed, and
     * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an
     * arbitrary thread.
     * </p>
     */
public void notifyConfigChangedForSubId(int subId) {
    try {
        ICarrierConfigLoader loader = getICarrierConfigLoader();
        if (loader == null) {
            Rlog.w(TAG, "Error reloading config for subId=" + subId + " ICarrierConfigLoader is null");
            return;
        }
        loader.notifyConfigChangedForSubId(subId);
    } catch (RemoteException ex) {
        Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex.toString());
    }
}
Also used : ICarrierConfigLoader(com.android.internal.telephony.ICarrierConfigLoader) RemoteException(android.os.RemoteException)

Aggregations

RemoteException (android.os.RemoteException)8 ICarrierConfigLoader (com.android.internal.telephony.ICarrierConfigLoader)8 SystemApi (android.annotation.SystemApi)4