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

Commit 4b305308 authored by Jack Yu's avatar Jack Yu Committed by Automerger Merge Worker
Browse files

Merge "Add intent to notify applications when the secure element state...

Merge "Add intent to notify applications when the secure element state changed" am: 286dc55b am: 27a214da am: c7396ea4

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1531801

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4e55ab51e07473e00a61873fffd06bd6453c684
parents 773d2c63 c7396ea4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36460,6 +36460,9 @@ package android.se.omapi {
    method @NonNull public String getVersion();
    method public boolean isConnected();
    method public void shutdown();
    field public static final String ACTION_SECURE_ELEMENT_STATE_CHANGED = "android.se.omapi.action.SECURE_ELEMENT_STATE_CHANGED";
    field public static final String EXTRA_READER_NAME = "android.se.omapi.extra.READER_NAME";
    field public static final String EXTRA_READER_STATE = "android.se.omapi.extra.READER_STATE";
  }
  public static interface SEService.OnConnectedListener {
+25 −0
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@

package android.se.omapi;

import android.annotation.BroadcastBehavior;
import android.annotation.NonNull;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -70,6 +73,28 @@ public final class SEService {
        void onConnected();
    }

    /**
     * Broadcast Action: Intent to notify if the secure element state is changed.
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    @BroadcastBehavior(registeredOnly = true, protectedBroadcast = true)
    public static final String ACTION_SECURE_ELEMENT_STATE_CHANGED =
            "android.se.omapi.action.SECURE_ELEMENT_STATE_CHANGED";

    /**
     * Mandatory extra containing the reader name of the state changed secure element.
     *
     * @see Reader#getName()
     */
    public static final String EXTRA_READER_NAME = "android.se.omapi.extra.READER_NAME";

    /**
     * Mandatory extra containing the connected state of the state changed secure element.
     *
     * True if the secure element is connected correctly, false otherwise.
     */
    public static final String EXTRA_READER_STATE = "android.se.omapi.extra.READER_STATE";

    /**
     * Listener object that allows the notification of the caller if this
     * SEService could be bound to the backend.
+3 −0
Original line number Diff line number Diff line
@@ -321,6 +321,9 @@

    <protected-broadcast android:name="android.net.nsd.STATE_CHANGED" />

    <!-- For OMAPI -->
    <protected-broadcast android:name="android.se.omapi.action.SECURE_ELEMENT_STATE_CHANGED" />

    <protected-broadcast android:name="android.nfc.action.ADAPTER_STATE_CHANGED" />
    <protected-broadcast android:name="android.nfc.action.ALWAYS_ON_STATE_CHANGED" />
    <protected-broadcast android:name="android.nfc.action.PREFERRED_PAYMENT_CHANGED" />