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

Commit e90a4d26 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "nfc_aosp_main_merge" into main

* changes:
  Adding wallet payment service to log protos for nfc.
  [nfc] Add disallow nfc change user restriction.
  Change NFC antenna api comments to indicated top-left start point for all axis.
  Eliminate boilder plate code for recovering service in NfcAdapter
  Add Test method to inject HCE data
  [framework] Add a flag for nfc persist log.
  Add NFC observe mode + auto-transact dumpsys protos
  Add NFC observe mode + auto-transact dumpsys logging
  Fix PollingFrame timestamp documentation
  Set default discovery technology
  [framework] Add Nfc oem extension api surface.
  Pass package name to `NfcService.setObserveMode()`
  [framework] Expose enable()/disable() as public api.
  Add POLLING_LOOP_TYPE_UNKNOWN to PollingFrameType
  Offhost NFC services shouldn't be able to register non-autotransact polling loop filters
  Document that only the currently preferred service can enable and disable observe mode
  nfc(api): Move @hide constants to Constants.java
  Use PollingFrame class instead of Bundles to represent polling frames in NFC stack
  Make NFC library available to multidevice CTS NFC tests
  nfc(api): Link against framework-permission
  KEY_POLLING_LOOP_TIMESTAMP is a long not an int
  Un-deprecate some NFC methods
  Reword autoTransact javadoc
  nfc(api): Change min_sdk to current for framework-nfc
  Revert^3 "nfc(api): Change min_sdk to V for framework-nfc"
  [nfc] Pass in package name to nfcService when enabling nfc.
  Add javadoc for autoTransact parameter
  Revert^2 "nfc(api): Change min_sdk to V for framework-nfc"
  Use long for timestamp in PollingFrame
  Revert "nfc(api): Change min_sdk to V for framework-nfc"
  nfc(api): Change min_sdk to V for framework-nfc
  Add API for polling loop pattern filters based on developer feedback.
  Add Javadoc for PollingFrame constructor
  Provide information on whether a polling frame is auto-transact
  Treat gain as an unsigned int
  Rename getGain() to getVendorSpecificGain()
  Deprecate methods on CardEmulation in favor of Wallet Role.
parents c90540ca 5fd321ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34045,6 +34045,7 @@ package android.os {
    field public static final String DISALLOW_BLUETOOTH_SHARING = "no_bluetooth_sharing";
    field public static final String DISALLOW_CAMERA_TOGGLE = "disallow_camera_toggle";
    field public static final String DISALLOW_CELLULAR_2G = "no_cellular_2g";
    field @FlaggedApi("android.nfc.enable_nfc_user_restriction") public static final String DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO = "no_change_near_field_communication_radio";
    field public static final String DISALLOW_CHANGE_WIFI_STATE = "no_change_wifi_state";
    field public static final String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
    field public static final String DISALLOW_CONFIG_BRIGHTNESS = "no_config_brightness";
+3 −0
Original line number Diff line number Diff line
@@ -10405,6 +10405,7 @@ package android.nfc.cardemulation {
  @FlaggedApi("android.nfc.enable_nfc_mainline") public final class ApduServiceInfo implements android.os.Parcelable {
    ctor @FlaggedApi("android.nfc.enable_nfc_mainline") public ApduServiceInfo(@NonNull android.content.pm.PackageManager, @NonNull android.content.pm.ResolveInfo, boolean) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void addPollingLoopFilter(@NonNull String, boolean);
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void addPollingLoopPatternFilter(@NonNull String, boolean);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public int describeContents();
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public void dump(@NonNull android.os.ParcelFileDescriptor, @NonNull java.io.PrintWriter, @NonNull String[]);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public void dumpDebug(@NonNull android.util.proto.ProtoOutputStream);
@@ -10416,6 +10417,7 @@ package android.nfc.cardemulation {
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public android.nfc.cardemulation.AidGroup getDynamicAidGroupForCategory(@NonNull String);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @Nullable public String getOffHostSecureElement();
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") @NonNull public java.util.List<java.lang.String> getPollingLoopFilters();
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") @NonNull public java.util.List<java.util.regex.Pattern> getPollingLoopPatternFilters();
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<java.lang.String> getPrefixAids();
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public String getSettingsActivityName();
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean getShouldAutoTransact(@NonNull String);
@@ -10430,6 +10432,7 @@ package android.nfc.cardemulation {
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public CharSequence loadLabel(@NonNull android.content.pm.PackageManager);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public boolean removeDynamicAidGroupForCategory(@NonNull String);
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void removePollingLoopFilter(@NonNull String);
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void removePollingLoopPatternFilter(@NonNull String);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public boolean requiresScreenOn();
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public boolean requiresUnlock();
    method @FlaggedApi("android.nfc.enable_nfc_mainline") public void resetOffHostSecureElement();
+26 −0
Original line number Diff line number Diff line
@@ -1899,6 +1899,31 @@ public class UserManager {
    public static final String DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO =
            "no_near_field_communication_radio";

    /**
     * This user restriction specifies if Near-field communication is disallowed to change
     * on the device. If Near-field communication is disallowed it cannot be changed via Settings.
     *
     * <p>This restriction can only be set by a device owner or a profile owner of an
     * organization-owned managed profile on the parent profile.
     * In both cases, the restriction applies globally on the device and will not allow Near-field
     * communication state being changed.
     *
     * <p>
     * Near-field communication (NFC) is a radio technology that allows two devices (like your phone
     * and a payments terminal) to communicate with each other when they're close together.
     *
     * <p>Default is <code>false</code>.
     *
     * <p>Key for user restrictions.
     * <p>Type: Boolean
     * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
     * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
     * @see #getUserRestrictions()
     */
    @FlaggedApi(Flags.FLAG_ENABLE_NFC_USER_RESTRICTION)
    public static final String DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO =
            "no_change_near_field_communication_radio";

    /**
     * This user restriction specifies if Thread network is disallowed on the device. If Thread
     * network is disallowed it cannot be turned on via Settings.
@@ -2056,6 +2081,7 @@ public class UserManager {
            DISALLOW_WIFI_DIRECT,
            DISALLOW_ADD_WIFI_CONFIG,
            DISALLOW_CELLULAR_2G,
            DISALLOW_CHANGE_NEAR_FIELD_COMMUNICATION_RADIO,
            DISALLOW_ULTRA_WIDEBAND_RADIO,
            DISALLOW_GRANT_ADMIN,
            DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO,
+17 −0
Original line number Diff line number Diff line
@@ -27,6 +27,20 @@ option java_multiple_files = true;
message ApduServiceInfoProto {
    option (.android.msg_privacy).dest = DEST_EXPLICIT;

    message AutoTransactMapping {
        option (.android.msg_privacy).dest = DEST_EXPLICIT;

        optional string aid = 1;
        optional bool should_auto_transact = 2;
    }

    message AutoTransactPattern {
        option (.android.msg_privacy).dest = DEST_EXPLICIT;

        optional string regexp_pattern = 1;
        optional bool should_auto_transact = 2;
    }

    optional .android.content.ComponentNameProto component_name = 1;
    optional string description = 2;
    optional bool on_host = 3;
@@ -35,4 +49,7 @@ message ApduServiceInfoProto {
    repeated AidGroupProto static_aid_groups = 6;
    repeated AidGroupProto dynamic_aid_groups = 7;
    optional string settings_activity_name = 8;
    optional bool should_default_to_observe_mode = 9;
    repeated AutoTransactMapping auto_transact_mapping = 10;
    repeated AutoTransactPattern auto_transact_patterns = 11;
}
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ message PreferredServicesProto {
    optional .android.content.ComponentNameProto foreground_requested = 5;
    optional .android.content.ComponentNameProto settings_default = 6;
    optional bool prefer_foreground = 7;
    optional .android.content.ComponentNameProto wallet_role_holder_payment_service = 8;
}

// Debugging information for com.android.nfc.cardemulation.EnabledNfcFServices
Loading