summaryrefslogtreecommitdiff
path: root/core/java/android/accounts/Account.java
Commit message (Collapse)AuthorAgeFilesLines
* Move accountname and typeName length check from Account.java to ↵Aseem Kumar2022-08-191-7/+0
| | | | | | | | | | | AccountManagerService. Bug: 169762606 Test: atest AccountManagerServiceTest Change-Id: I80fabf3a64c55837db98ff316e7e5420129c001b (cherry picked from commit 0adcadb0b28310bac568def4da2cbaf16843bcea) (cherry picked from commit cf62c760d4c002f562ddd5f372abe5bccda8a6ad) Merged-In: I80fabf3a64c55837db98ff316e7e5420129c001b
* Prevent apps from spamming addAccountExplicitly.Aseem Kumar2021-06-011-0/+7
| | | | | | | | | See comment here for the discussion on solution https://b.corp.google.com/issues/169762606#comment14 Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253 Bug: 169762606
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-2/+3
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-3/+2
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-2/+3
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz2020-10-151-1/+1
| | | | | | | | | | | | | | | | | | Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
* Check that Account Parcel has name and type.Dmitry Dementyev2019-04-081-0/+6
| | | | | | Bug: 129287265 Test: manual Change-Id: I8431eb27cc4c6dfd3048b28ff635474f14433308
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Obfuscate account name in account manager logs and dumpsys.Hui Yu2018-09-101-1/+36
| | | | | | | | | | | The account name could be PII or email address that should not be printed in android logs or dumpsys. In account manager output, call Account.toSafeString() to replace letters/digits in account name with character 'x'. Change-Id: Ic1abd1ecda99a309e8973f13bd3650286bbd59e6 Fix: 111937873 Test: atest AccountTest.java
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-061-0/+3
| | | | | | | | | | | | | | | | For packages: android.accounts This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I9f59cf8e0d0d36da7e6e24f811902de7c070b90d
* Use tokens instead of account access trackersSvet Ganov2016-09-231-11/+15
| | | | | | | | | | | | | | We keep track which process saw and account to whitelist the app for future access as an optimization to avoid prompting the user for account access approval. Some apps use SefeParcelable where the parcels are marshalled which does not allow the parcel to contain IBinders. To avoid this we are switching from account tracker remote objects to unforgeable tokens. bug:31162498 Change-Id: I19916b54afd0b47e57c517145aa6b1ff17154144
* While-list apps to access account if already saw itSvet Ganov2016-09-201-0/+47
| | | | | | | | | | | | | | | Sync adapters without an account access cannot run until the user approves the account access (for the case the account access is not allowed by other policy such as being singed with the same cert as the authenticator). However, if the sync adapter package already got the account from another app which means it already saw the account we white-list the sync adapter app to access the account as it already saw it - the bird is out of the cage. bug:31162498 Change-Id: I2b72f3b0d6307561ed68db2f2e9c900b15e8d098
* - changed removeAccount() to be handled by the AccountAuthenticator and to ↵Fred Quintana2009-08-141-12/+12
| | | | | | | return a boolean - changed the IAccountManager API to use oneway IPCs - changed the AccountManager to not have to start a thread for any of the calls (versus every call)
* AI 145177: phase two of the AccountManagerFred Quintana2009-04-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added an AccountManagerActivity, a base Activity that can be used by activities that are launched by AccountAuthenticator intents. This makes it easy for an Activity to send a result using an AccountAuthenticatorResponse - added debug strings to the AccountAuthenticatorCache - improved the API for the AccountAuthenticatorResponse and made it Parcelable so that it can be passed to an Activity via an Intent - changed the AccountManager to use Futures for the asynchronous calls and to notify the user via a callback when the request is complete - changed the AccountManager to convert any errors that are returned into Exceptions - added constants for the error codes that are passed across the IAccountManagerResponse and IAccountAuthenticatorResponse interfaces - added a dump() method to the AccountManagerService so that it can display the list of active sessions and registered authenticators - added an way to interrogate the AccountManagerService for the list of registered authenticators - removed more methods from the GoogleLoginServiceHelper and GoogleLoginServiceBlockingHelper and changed the callers to use the AccountManager Automated import of CL 145177
* Automated import from //branches/master/...@142414,142414Fred Quintana2009-03-241-0/+77