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

Commit 75fa9b43 authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "SystemAPI RoleManager.getFinancialSms"

am: a1e84ee2

Change-Id: Ic60d1aa552fcfb9d0f9551f8d6bb027e3572b912
parents adb37634 a1e84ee2
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -20,16 +20,10 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.AppOpsManager;
import android.app.PendingIntent;
import android.app.role.IRoleManager;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
import android.provider.Telephony.Sms.Intents;
import android.telephony.IFinancialSmsCallback;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
import android.telephony.SubscriptionManager;
@@ -146,24 +140,6 @@ public class AppSmsManager {
        return token;
    }

    /**
     * Get filtered SMS messages for financial app.
     */
    public void getSmsMessagesForFinancialApp(
            String callingPkg, Bundle params, final IFinancialSmsCallback callback) {
        try {
            IRoleManager roleManager = IRoleManager.Stub.asInterface(
                    ServiceManager.getServiceOrThrow(Context.ROLE_SERVICE));
            roleManager.getSmsMessagesForFinancialApp(callingPkg, params, callback);
        } catch (RemoteException e) {
            Log.e(LOG_TAG, "Receive RemoteException.");
            // do nothing
        } catch (ServiceNotFoundException e) {
            Log.e(LOG_TAG, "Service not found.");
            // do nothing
        }
    }

    /**
     * Handle an incoming SMS_DELIVER_ACTION intent if it is an app-only SMS.
     */
+0 −9
Original line number Diff line number Diff line
@@ -28,10 +28,8 @@ import android.app.PendingIntent;
import android.content.Context;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
import android.os.ServiceManager;
import android.provider.Telephony.Sms.Intents;
import android.telephony.IFinancialSmsCallback;
import android.telephony.Rlog;
import android.telephony.SmsManager;
import android.telephony.SubscriptionInfo;
@@ -512,13 +510,6 @@ public class SmsController extends ISmsImplBase {
        return getPhone(subId).getAppSmsManager().createAppSpecificSmsToken(callingPkg, intent);
    }

    @Override
    public void getSmsMessagesForFinancialApp(
            int subId, String callingPkg, Bundle params, IFinancialSmsCallback callback) {
        getPhone(subId).getAppSmsManager().getSmsMessagesForFinancialApp(
                callingPkg, params, callback);
    }

    @Override
    public int checkSmsShortCodeDestination(
            int subId, String callingPackage, String destAddress, String countryIso) {