Age | Commit message (Collapse) | Author |
|
3f1247e91b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/177320
Change-Id: Ifb7370b8438fd2932b98a031b43af4f48e4869f4
|
|
Change-Id: I63899c42fac7f52866a2d2f6db060cf7918547c8
|
|
The java_sdk_library modules are now added with 'default_to_stubs: true'
so that their impl libraries are not used even when the clients don't
have sdk_version property set.
This will allow us to replace the direct references to the stub
libraries of the java_sdk_library modules with the references to the
modules themselves (e.g. android.test.base.stubs -> android.test.base)
in many of the CTS tests without unintentionally exposing the private
APIs in the impl lib.
As part of the change, MockContentProvider.getIContentProviderBinder()
now returns an anonymous Binder object instead of throwing an exception.
This is to eliminate the need for clients to override the now
inaccessible method to escape from the exception.
Also, InstrumentationTestRunner.addTestListener method is added to the
stub because it is used by several tests (MtpServiceTests, etc.)
Exempt-From-Owner-Approval: cherry-pick from master
Bug: 157007292
Test: m
Merged-In: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
(cherry picked from commit b4e458d1063a3ece9a7f539ed6dbaeb6fb9c495d)
Change-Id: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
|
|
The java_sdk_library modules are now added with 'default_to_stubs: true'
so that their impl libraries are not used even when the clients don't
have sdk_version property set.
This will allow us to replace the direct references to the stub
libraries of the java_sdk_library modules with the references to the
modules themselves (e.g. android.test.base.stubs -> android.test.base)
in many of the CTS tests without unintentionally exposing the private
APIs in the impl lib.
As part of the change, MockContentProvider.getIContentProviderBinder()
now returns an anonymous Binder object instead of throwing an exception.
This is to eliminate the need for clients to override the now
inaccessible method to escape from the exception.
Also, InstrumentationTestRunner.addTestListener method is added to the
stub because it is used by several tests (MtpServiceTests, etc.)
Bug: 157007292
Test: m
Merged-In: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
(cherry picked from commit b4e458d1063a3ece9a7f539ed6dbaeb6fb9c495d)
Change-Id: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
|
|
073943f0fd am: a7d0cbe7f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1321319
Change-Id: I51471064908f8af5626f0edd8824d988875f0644
|
|
Those two classes are used by many tests using android.test.runner.
Making them as public APIs so that those tests can depend on the public
stub of android.test.runner and stop depending on its implementation
library.
Bug: 157007292
Test: m
Change-Id: I33b458f34ffd4c73430f538a85aac308baa6e010
|
|
This metrics now is used for calculating the value reported by
Display#getSize. It could be extended to have more function later.
Also replace getCurrentMetrics usages to make them report
Display#getSize value.
Bug: 148904274
Test: atest WindowMetricsHelperTest
Change-Id: I182b6e63f7c28752eee22839cb9e69f073046c3f
|
|
Use case: Jetpack WM will use them to get the location of windows on
screen and compute the display feature positions in window coordinate
space.
Bug: 150908045
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests
Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b
Exempt-From-Owner-Approval: API change
|
|
in f/b
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.
Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
|
|
Allow app to control the thread where ServiceConnection methods are
called on.
Bug: 111434506
Test: Used new bindContext method in chrome and checked callbacks
are on the correct thread.
Change-Id: I480e5bd6773a530fb9e8e73e3a2a2a88b76569ec
|
|
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
|
|
Bug: 30188076
Test: m -j20 RUN_ERROR_PRONE=true android.test.base android.test.runner
Change-Id: I735e3fbfcc710f1dc1b96e04f91b9feda8727b6c
|
|
Previous change added some new public APIs to allow the
android.test.runner classes to be built against the public API stubs
rather than the internal classes. This change updates the
android.test.runner classes to use that new API.
This in turn is preparation for building an android.test.legacy library
that can be safely statically included in APKs.
Bug: 30188076
Test: make checkbuild
(cherry picked from commit 20af1df63f77f6b3ab12fd6221f581fe84182091)
Merged-In: I302626abb7e048ef0c3169e9a5209b85f2f87d34
Change-Id: Ie05a17598fcabc1189cacc912c01a25782ebd29c
|
|
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
Merged-In: I20e5b06ba79677e76117c82e9f9e2ecd15e5fed6
(cherry picked from commit e254526f0fe5d22681555bd4a00b7ee96fee1dc1)
|
|
When emitting a method or field, verify that we're able to reference
all mentioned types. This ensures that we don't accidentally
reference undefined classes/interfaces.
Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
Merged-In: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
|
|
Change-Id: Ic9cf7ecd80dd99eb8bcfc9810f4a9fddfe8f8fe4
Fixes: 64568898
Test: None. No code change.
|
|
Change-Id: I57e5c132bc58a32d70007a7a105775b526ff7bb9
Fixes: 62805090
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_null
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_empty
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_valid
|
|
am: 88d54c3080
am: 06620ee22d
Change-Id: I1a4de01fe23a03b42c052f23733d95e07135ab73
|
|
am: 88d54c3080
Change-Id: I3716fc728a6789a33851f4f0ad30a3ad9f421a17
|
|
am: 8c7026c5a3
Change-Id: I503ae16c4d47ce3cecb79987da919c7f579347da
|
|
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
PackageInfoSources only provided a static field and accessor method so
they were moved into ClassPathPackageInfoSource and PackageInfoSources
was removed.
ClassPathPackageInfo was only used in ClassPathPackageInfoSource and in
TestGrouping. In the latter it was simply used as an intermediate value
between ClassPathPackageInfoSource.getPackage(String packageName) and
ClassPathPackageInfo.getTopLevelClassesRecursive(String packageName).
Moving that method into ClassPathPackageInfoSource allowed the
ClassPathPackageInfo to become an inner class of
ClassPathPackageInfoSource. As it is an inner class it no longer needed
an explicit reference to the containing ClassPathPackageInfoSource.
Bug: 30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: Idb0b6a585030805b9cff8562abb93b7e5920c53a
|
|
am: 8d33b10edb
Change-Id: I372ea1e9456a303903bb57929129cc3f922cb8d9
|
|
am: 143f5d652c
Change-Id: I1b2212164ab566f3619cdbe307ff9ee600242424
|
|
am: 930ab689f0
Change-Id: I0d61b4e26c9551d177b5bb7bbdaab25885976c0d
|
|
|
|
oc-dev-plus-aosp am: 50826c5f2e
am: 4f9d89a380
Change-Id: I24b978bb63875ed7e1af7041f8ecbbfc482e0614
|
|
am: 50826c5f2e
Change-Id: Ica9b9b478b670ec5467732a09cf123dd63780c97
|
|
|
|
am: 4601ebf945 am: 1fee4dcd5d
am: 88f06cba46
Change-Id: I4c8b5ff724ccb73a681ba5bef86ebe5a502383be
|
|
am: 4601ebf945
am: 1fee4dcd5d
Change-Id: I6362ff0e8e76efd4d7b8c326f77b282740d01e03
|
|
am: 4601ebf945
Change-Id: Icf7b8d1f5a3e0d18cd9a096a8171d6dab98b5992
|
|
|
|
am: ad654a3af5
Change-Id: Idd36689c3a90728ee543be0ffa7457fe79b66ba3
|
|
am: b5b6e7cf45
Change-Id: I98265e973df1bf7ac28b7f79f6ccd0a865762304
|
|
am: e38d503394
Change-Id: I62a80b405d05ec7b4da050bd6b01df4c965d6187
|
|
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.
Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
(cherry picked from commit 6d6cd68660635d670b0cb17f348b7c1da13704b3)
|
|
am: 824d75e0e1
Change-Id: I5518dbd8b5d8a4548ea00bbfca0e3aee87880ee7
|
|
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.
This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.
Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
|
|
|
|
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.
Bug: 62813533
Bug: 62879353
Test: Manually done
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
|
|
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The HasClassAnnotation and HasMethodAnnotation were never used
separately and only used by HasAnnotation. This merges the functionality
into a single nested class in TestPredicates, hidden behind the new
TestPredicates.hasAnnotation(). The HasAnnotationTest was renamed as
TestPredicatesTest and the HasClassAnnotationTest and
HasMethodAnnotationTest classes were removed as their tests provide no
additional coverage. The removal of the Has*Annotation.java files means
that the test-runner/src/android/test/suitebuilder/annotation/ directory
is empty apart from the package.html file so that was moved to
legacy-test to sit alongside the actual annotation classes.
The Predicates class, while part of the legacy-test module was only
ever used by the test-runner module and only its not() method was
actually used. So, the not() method and associated nested class were
moved to TestPredicates, the tests for not() were moved to
TestPredicatesTest and the Predicates* classes were removed.
That allowed for the removal of the legacy-android-tests as that is now
empty.
TestPredicates has a number of constants that were public. They were
hidden by moving them to the class that actually used them.
A minor generic issue was fixed in AssignableFrom.
Bug: 30188076
Test: make checkbuild and run FrameworkTestRunnerTests
Change-Id: I861da388a4146bb28e1e480d1b7ba9137b7b270e
|
|
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
TestCaseUtil.getTestCaseNames() is only used by tests but its tests did
provide some coverage of the getTests() method so remove the method and
the tests the method was simply moved into TestCaseUtilTest and the
tests renamed to make it clearer that they are testing
TestCaseUtil.getTests().
Similarly, TestCaseUtil.createTestSuite() was only used by tests but its
tests did provide some coverage of the invokeSuiteMethodIfPossible()
method so the tests were modified and renamed to preserve that coverage.
TestCaseUtil.getTestAtIndex() was completely unused so was just removed.
Bug: 30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: I62bbdbab428d7560f0c7df11f313fe60cfd31d13
|
|
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The android.test.TestCase class is only referenced from the
DatabasePerformanceTests class. There do not seem to be any references
to that class either and there is a NewDatabasePerformanceTests.java
file in the same directory that looks to be a JUnit based replacement.
Bug: 30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: Iafb26dc98a40715244f07d1c9e05ada5b1602ebf
|
|
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The TestRunner class is not part of the API and is unused anywhere
within Android code (apart from one unused import which is in the
process of being removed) and in TestPrinter.
TestPrinter is not part of the API and its only use of TestRunner is to
implement the TestRunner.TestListener interface. It was safe to stop
TestPrinter from implementing TestRunner.TestListener because the latter
is only called from TestRunner which itself is never used. TestPrinter
was made package private as it is only used from the same package.
One the usages in TestPrinter were removed it was safe to remove
TestRunner.
Bug: 30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: I0f4a6cf1fbec14c4778c6e09b8eabf822802774f
|
|
|
|
am: e2744c2705
Change-Id: I3493057c8362733f117dbc25f654497b9f22f219
|
|
am: e6ac3a4efc
Change-Id: Id41ba23de38e5131460cad283fd5d7bea66d2156
|
|
|
|
am: b4621a4072
Change-Id: I76b035a84dd184b2ff92fc175df383bc9983f616
|
|
am: 4d7e8fb79e
Change-Id: I6d1de1dcb677e6c2c85c75fe8c5166b07cf713dd
|