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

Commit 63c4c06b authored by Shishir Agrawal's avatar Shishir Agrawal
Browse files

Expose getCarrierPackageNamesForBroadcastIntent as a hidden @SystemApi

It will be required by setup wizard to delegate initialization to the carrier
app.

Change-Id: Icc0fc728e1e24235632ac38a482b06a7b829de78
parent 73b7a4db
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.SystemApi;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -2978,6 +2979,19 @@ public class TelephonyManager {
        return CARRIER_PRIVILEGE_STATUS_NO_ACCESS;
    }

    /** @hide */
    @SystemApi
    public List<String> getCarrierPackageNamesForBroadcastIntent(Intent intent) {
        try {
            return getITelephony().getCarrierPackageNamesForBroadcastIntent(intent);
        } catch (RemoteException ex) {
            Rlog.e(TAG, "getCarrierPackageNamesForBroadcastIntent RemoteException", ex);
        } catch (NullPointerException ex) {
            Rlog.e(TAG, "getCarrierPackageNamesForBroadcastIntent NPE", ex);
        }
        return null;
    }

    /** @hide */
    @SystemApi
    public void dial(String number) {
+12 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.telephony;

import android.content.Intent;
import android.os.Bundle;
import java.util.List;
import android.telephony.NeighboringCellInfo;
@@ -659,6 +660,17 @@ interface ITelephony {
     */
    int checkCarrierPrivilegesForPackage(String pkgname);

    /**
     * Returns the package name of the carrier apps that should handle the input intent.
     *
     * @param packageManager PackageManager for getting receivers.
     * @param intent Intent that will be broadcast.
     * @return list of carrier app package names that can handle the intent.
     *         Returns null if there is an error and an empty list if there
     *         are no matching packages.
     */
    List<String> getCarrierPackageNamesForBroadcastIntent(in Intent intent);

    /**
     * Set whether Android should display a simplified Mobile Network Settings UI.
     * The setting won't be persisted during power cycle.