summaryrefslogtreecommitdiff
path: root/test-mock/api
AgeCommit message (Collapse)Author
2021-01-18Expose Context#sendStickyBroadcast(Intent, Bundle)paulhu
Bug: 177223402 Test: atest FrameworksCoreTests:ContextTest Test: atest CtsContentTestCases:ContextTest Change-Id: Ic85419934cf2c9df4e0f9cc287585b3296cec819
2020-10-19Remove @TestApi from @SystemApi symbolsAnton Hansson
I ran these commands: cd frameworks/base grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs' grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs' Bug: 171179806 Test: m checkapi Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789 Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-05-11Update lint-baseline.txt for android.test.mockPaul Duffin
Bug: 156126315 Bug: 156175891 Test: m checkapi Change-Id: I39d5f458fdf965c14c999f906cbe4a487d33cf0f
2020-05-11Add lint-baseline.txt files for test base/runner/mockPaul Duffin
In preparation for enabling API lint checking on java_sdk_library adds lint-baseline.txt containing all the existing issues for these APIs. The test-base and test-runner APIs are old and have been deprecated so there is little benefit in fixing those issues. The test-mock API while old has not been deprecated and so should be cleaned up. Bug 156175891 tracks that cleanup work. Bug: 156126315 Bug: 156175891 Test: m checkapi Merged-In: Ifb4669fcf7f2a36e5cb4d593bfc5d03330901ee9 Change-Id: Ifb4669fcf7f2a36e5cb4d593bfc5d03330901ee9 (cherry picked from commit ee5a4af4c5a7f8f9b3b33ded7f1fd9da9497d9ff)
2020-01-22Introduce WindowContext APIAndrii Kulian
Test: atest WmTests CtsWindowManagerDeviceTestCases Bug: 128338354 Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
2019-06-28Permission flag updates now notify listenersNate Myren
Added a version of the onPermissionUpdated and onInstallPermissionUpdated methods which will notify OnPermissionChangedListeners, and added this to the PermissionManagerService "updatePermissionFlags" and "updatePermissionFlagsForAllApps" methods. Also adds OnPermissionsChangedListener to @TestApi Fixes: 135937566 Test: atest PermissionUpdateListenerTest Change-Id: I906598c366234c3daaa202261678bca04837cb13
2019-03-22Add Shell permission for CTS test.wilsonshih
Add Shell permission for new CTS tests to test the multi-display functionality in WallpaperService/WallpaperManagerService. Bug: 123707989 Test: atest WallpaperManagerMultiDisplayTests Test: atest ActivityManagerMultiDisplayTests Change-Id: Id97db050a0b9d1940c2dfaa793fbe526df578105
2019-02-21Added some TestApi that are already used by CTSWale Ogunwale
Allows us to remove the use of private platform API from CTS. Bug: 124134247 Test: builds Change-Id: Iceb81ff7c9385e877d2612fbb7b506245d116928
2019-02-15Expose permission flag APIs for testsPhilip P. Moltmann
tests need to make sure the flags are set correctly. Bug: 116738135 Test: atest CtsBackupTestCases:android.backup.cts.PermissionTest#testRestorePermReviewed Change-Id: Ia1000de3594e910c3345e205679bee37be898d17
2019-02-08Merge "Add TEST_MAPPING for api specifications" am: 6bb71b0322 am: cd2586709bPaul Duffin
am: 17abc1fd96 Change-Id: I76724e470d2de7b34900a5d21b6dd3b24ee6124d
2019-02-06Add TEST_MAPPING for api specificationsPaul Duffin
Changes to the various api directories will run the tests which make use of the API specification in those directories. Could not include CtsSystemApiSignatureTestCases as it is broken on git_master because of bug 116632058. Bug: 123254057 Test: atest Change-Id: I1fe4ca498cbd0393aba7cf4c1386a6325ace7937
2019-01-22API Compatibility: Fix incompatible abstract methods on ContextAdrian Roos
Bug: 123221743 Test: m api-stubs-docs-check-last-released-api Change-Id: I6d34c86582633d696464c8207a7d631be6d31693
2019-01-19Update signature files to the new formatTor Norbye
The new format is described in tools/metalava/FORMAT.md. Fixes: 116589402 Switch signature files over to the v2 format Fixes: 112626813 Drop "synchronized" modifier from the signature format Fixes: 122358225 Omit overriding methods that only differ in final [...] Fixes: 73088715 API Review: Need doclava to output nullability Fixes: 79739773 API Review: Metalava enforcing constants are constant Exempt-From-Owner-Approval: Large-scale tooling change Test: make sdk, make update-api, make checkapi Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2
2019-01-19Update signature files to the new formatTor Norbye
The new format is described in tools/metalava/FORMAT.md. Fixes: 116589402 Switch signature files over to the v2 format Fixes: 112626813 Drop "synchronized" modifier from the signature format Fixes: 122358225 Omit overriding methods that only differ in final [...] Fixes: 73088715 API Review: Need doclava to output nullability Fixes: 79739773 API Review: Metalava enforcing constants are constant Exempt-From-Owner-Approval: Large-scale tooling change Test: make sdk, make update-api, make checkapi Change-Id: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0 Merged-In: Ia248aece5250e84e47c815c601133b698bf644c2
2018-11-29AML: Make Context#getOpPackageName() publicJaewan Kim
Bug: 119748678 Test: build Change-Id: I79f7d057df5b61fa661987d36f20d24825eb1e5b
2018-11-21Add new API to performing grouping and ordering of bindings.Dianne Hackborn
This will allow apps to better manage many isolated processes, telling the system how they are grouped together (so should be managed as one related entity within the LRU cache) and fine-tune the ordering within that group. The API is not yet tested... though in theory it is implemented. But the implementation done for that also fixes a *lot* of problems with activity LRU management that, even without groups, should make the ordering of processes in the LRU list much more consistently match how recently the user has interacted with it. Also clean up some of the new dumpsys output in the activity manager: move the new sections to before the process output (so it is still easy to see the process state at the end of the output), and add and document the command line options for controlling them. And add a new "lru" section that gives a clear view of what is going on with the raw LRU list. An upcoming change will add tests for the new grouping functionality, and probably some fixes resulting from that. Test: atest CtsAppTestCases:ServiceTest Bug: 111434506 Change-Id: I1f6b6b9de66ccde1573e1a0e9615e8c5f8e6c0d7
2018-11-13Implement naming of isolated service bindings.Dianne Hackborn
This allows clients to run multiple instances of the same manifest service declaration. It only works for isolated services, to avoid too much abuse temptation. This is part of the "Chrome site isolation" work, to allow chrome to have many more render processes running and help it manage them. Bug: 111434506 Test: atest CtsAppTestCases:ServiceTest Change-Id: I22e65758678a07075ed32ed6463082ddf846d3a4
2018-10-12Suspending app can customize intercepting dialogSuprabh Shukla
The suspending app has more context about why a particular app was suspended by the user, but we do not want to delegate the interception of the suspended activity out of the system. Hence allowing it further customizations to the dialog to make it clearer. Test: atest com.android.server.pm.SuspendDialogInfoTest \ com.android.server.pm.SuspendPackagesTest \ com.android.server.pm.PackageUserStateTest \ com.android.server.pm.PackageManagerSettingsTests \ com.android.server.am.ActivityStartInterceptorTest atest GtsSuspendAppsPermissionTestCases GtsSuspendAppsTestCases Bug: 112486945 Bug: 113150060 Change-Id: If9f4d14587a2b75bb572e7984a90e300a2c72d16
2018-09-10Make PackageManager#arePermissionsIndividuallyControlled system-apiPhilip P. Moltmann
The PermissonController is going to become a mainline module, hence it has to compile against @SystemApi. PackageManager#arePermissionsIndividuallyControlled controls how certain permissions are presented in the UI, hence Permission controller needs to read it. The value of this API comes from a config option. Bug: 110953302 Test: Built Change-Id: If78b1bb594af0c85e92abf70ae8315e7ba3f31fa
2018-08-29Build android.test.* with java_sdk_librarySundong Ahn
android.test.* are built with java_sdk_library and api files are added by running "make update-api". android.test.base_static is created for allowing to use android.test.base as a static library. Bug:77577799 Test: make -j Test: make checkapi Test: make checkapi fails with a random change in the txt file Test: adb shell cmd package list libraries |\ grep android.test.* And check the android.test.* libraries Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
2018-08-22Deprecate Resources#getMovie()Aurimas Liutikas
Movie class has been deprecated, deprecate the getMovie as well. Bug: 113054577 Test: None Change-Id: Ic217adc002c7cfbe795e855689af1a58447b7d39
2018-08-16Build android.test.* with java_sdk_librarySundong Ahn
android.test.* are built with java_sdk_library and api files are added by running "make update-api". android.test.base_static is created for allowing to use android.test.base as a static library. Bug:77577799 Test: make -j Test: make checkapi Test: make checkapi fails with a random change in the txt file Test: adb shell cmd package list libraries |\ grep android.test.* And check the android.test.* libraries Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
2018-03-20Add SoundTriggerDetectionServicePhilip P. Moltmann
The service is meant to replace the PendingIntent based API. Once all users of the PendingIntent based API switched the PendingIntent based API will be removed. To have as little as possible impact on the whole SoundTrigger framework the RemoteSoundTriggerDetectionService class implements the same interface as the PendingIntent based class. Hence the exising code has very little change. Further once the old code can be removed the amount of changed (and added) code is limited. The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService is a vanilla as possible service implementation. The special behaviors are: - The system holds a wakelock while service operations are in progress and the service is bound as foreground. Hence the service can e.g. listen to the microphone. - Service operations have a certain amount of time they are allowed to run. Once every operation is either finished or the the operation exceeded the allotted time, the system calls onStopOperation for each still pending operation. This is a similar model as for the commonly used JobService. Please note that if the time allowed for an operation is 15s and op1 was run as 0si, and op1 was run at 5s, the service is allowed to run until 20s. Hence _both_ onStopOperations will happen at 20s. This is done for ease of implementation but should not give the service more power than calling onStopOperation exactly 15s after each operation is triggered. - If an operation is done before the allotted time is reached, the service can declare the operation as finished manually by calling onOperationFinished. This is a call back into the system, hence a 'client' binder is sent to the service. If the operation is finished by calling this method onStopOperation will not be called. - As the service instance might be killed and restored between operations we add a opaque bundle 'params' to each operations. The users of the API can use this to send data from the start command to the operations. It can also just be set to null. The params are not meant to store changing state in between operations. Such state needs to be persisted using the regular methods (e.g. write it to disk) - A service can be used for multiple recognition sessions. Each recognition is uniquelity defined by its sound model UUID. Hence each operation gets at least tree arguments: Operation ID, sound mode UUID, params - As a small optimization the params are cached inside of the service instance. The time allowed for each operation is in a @SystemAPI global setting, so the service can make sure it finishes the operations before they are stopped. It might take some time to deliver the operations via the binder, hence it is not recommended to try to use every last ms of allotted time. Test: atest SoundTriggerDetectionServiceTest (added in separate CL) atest android.provider.SettingsBackupTest Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93 Fixes: 73829108
2018-01-09Add apis needed for android.test.legacyPaul Duffin
The long term goal of removing junit and dependent android.test classes from the android.jar is the removal of the runtime libraries that provide those classes. A key part of the strategy for migrating APKs off the runtime libraries is the android.test.legacy library which APKs can statically include in place of the runtime dependencies without having to change their source code. The longer term goal is for all tests to migrate from these classes altogther and to use the Android Test Support Library instead but that will require significant changes to the test source code. In order for it to be safe to statically include android.test.legacy in an APK it cannot use any internal APIs. This change adds the additional classes and methods needed to the android.test.mock API library. The additions are all marked as deprecated to try and avoid developers from using them in new tests. It also marks the AccountManager constructor used by MockAccountManager with the android.annotation.MockApi so that it is included in the mock stubs libraries against which the android.test.mock.stubs[-system] libraries build. Bug: 30188076 Test: make checkbuild Change-Id: I85417cc328cab898ab93b9b726648f4232555324
2017-12-19Add android.test.mock.stubs-systemPaul Duffin
The android.test.mock package contains one class with some methods that are annotated with @SystemApi which are not present in the android.test.mock.stubs. This adds a new android.test.mock.stubs-system library that includes those additional methods. Checked that the new API definition files contain the exact same definitions for the android.test.mock packages as are found in the api/system-current.txt and api/system-removed.txt files. Bug: 30188076 Test: make update-api && make checkbuild Change-Id: I4644d30716e556204caa4acb53d7af84ca520271
2017-12-19Fix visibility issues with android.test.mock.stubsPaul Duffin
This ensures that the API definitions for the android.test.mock package matches the definitions in the api/current.txt file. Bug: 30188076 Test: make update-api Change-Id: Id325b8cf2f189117ac4cfe7634095ab710eee004
2017-11-22Emit all APIs using Predicates.Jeff Sharkey
Generate APIs using updated doclava. Test: manual inspection of API text files Bug: 69505783 Change-Id: I2efd22998a64ebb57588b073c4a591242f4aef91
2017-11-16Remove one legacy install pathPhilip P. Moltmann
Also removed everything needed only for this path Test: Installed app via package installer, adb, google play store Bug: 65261282 Change-Id: Ia8a03fa5900687cd2adf844ba7e6c07e0537382e
2017-11-16Separate android.test.mock from test-runner sourcePaul Duffin
Extracts the source for the android.test.mock library from the frameworks/base/test-runner directory into its own frameworks/base/test-mock directory. They are already treated separately at runtime and compile time so this just makes the separation complete. Bug: 30188076 Test: make checkbuild Change-Id: I20e5b06ba79677e76117c82e9f9e2ecd15e5fed6