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

Commit 52745479 authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

Update account visibility API.

Remove no longer used functions and in-memory visibility table.
Add stubs for new methods.
Actual implementation will be added in follow up CLs.
Bug: https://b.corp.google.com/issues/33046496
Test: manual tests, cts tests.

Change-Id: I990759b20c57df70bc944e27b84e59b9f77b9bd4
parent 0de5d03c
Loading
Loading
Loading
Loading
+457 −207

File changed.

Preview size limit exceeded, changes collapsed.

+10 −9
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.os.Bundle;
import android.os.RemoteCallback;
import android.os.UserHandle;

import java.util.Map;

/**
 * Central application service that provides account management.
 * @hide
@@ -106,18 +108,17 @@ interface IAccountManager {
    void isCredentialsUpdateSuggested(in IAccountManagerResponse response, in Account account,
        String statusToken);

    /* Allows Authenticator to view what packages or UIDs on phone have requested it. */
    /* Allows Authenticator to get UIDs of packages which registered to receive updates about given account type.*/
    int[] getRequestingUidsForType(String accountType);

    /* Allows authenticator to add an account explicitly that is only visible to
     certain uids; the authenticator learns of these UIDs */
    boolean addAccountExplicitlyWithUid(in Account account, String password, in Bundle extras,
            in int[] selectedUids);
    boolean addAccountExplicitlyWithVisibility(in Account account, String password, in Bundle extras,
            in Map visibility);

    boolean setAccountVisibility(in Account a, int uid, int newVisibility);
    int getAccountVisibility(in Account a, int uid);

    /* Controls visibility of UIDs of applications to Accounts */
    boolean removeAccountVisibility(in Account a, in int uid);
    boolean makeAccountVisible(in Account a, in int uid);
    boolean isAccountVisible(in Account a, in int uid);
    /* Type may be null  returns Map <Account, Integer>*/
    Map getAccountsAndVisibilityForPackage(in String packageName, in String accountType);

    /* Check if the package in a user can access an account */
    boolean hasAccountAccess(in Account account, String packageName, in UserHandle userHandle);
+33 −447

File changed.

Preview size limit exceeded, changes collapsed.