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

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

Merge "nfc(api): Add a event log to indicate data migration" into main

parents de21a095 3e711fb8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -119,4 +119,5 @@ interface INfcAdapter
    boolean getSettingStatus();
    boolean isTagPresent();
    List<Entry> getRoutingTableEntryList();
    void indicateDataMigration(boolean inProgress, String pkg);
}
+14 −5
Original line number Diff line number Diff line
@@ -2795,11 +2795,8 @@ public final class NfcAdapter {
            @IntRange(from = 0, to = 15) int gid, @IntRange(from = 0) int oid,
            @NonNull byte[] payload) {
        Objects.requireNonNull(payload, "Payload must not be null");
        try {
            return sService.sendVendorNciMessage(mt, gid, oid, payload);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return callServiceReturn(() ->  sService.sendVendorNciMessage(mt, gid, oid, payload),
                SEND_VENDOR_NCI_STATUS_FAILED);
    }

    /**
@@ -2872,6 +2869,18 @@ public final class NfcAdapter {
                @IntRange(from = 9, to = 15) int gid, int oid, @NonNull byte[] payload);
    }

    /**
     * Used by data migration to indicate data migration is in progrerss or not.
     *
     * Note: This is @hide intentionally since the client is inside the NFC apex.
     * @param inProgress true if migration is in progress, false once done.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
    public void indicateDataMigration(boolean inProgress) {
        callService(() -> sService.indicateDataMigration(inProgress, mContext.getPackageName()));
    }

    /**
     * Returns an instance of {@link NfcOemExtension} associated with {@link NfcAdapter} instance.
     * @hide