Since developers can declare the "neverForLocation" flag in their
manifest as public API, we should also offer a way to inspect the
value that we parsed from the manifest. We do this by surfacing it
through the existing PackageInfo.requestedPermissionsFlags field.
This also means we can remove the PackageManagerInternal API, since
interested parties can now check PackageInfo directly.
Fix a potential security issue by only accepting flags from manifest
when the application is targeting a modern enough SDK.
Bug: 181812281
Test: atest CtsContentTestCases:PackageManagerTest
Test: atest FrameworksServicesTests:PackageParserTest
Test: atest com.android.server.pm.parsing
Change-Id: I877768c06ee15281f3334794034f4af563e74569
TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant
is necessary for the module to register the manager with
registerContextAwareService.
Bug: 171540887
Test: m
Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389
- Added the following testAPIs to replace the usage
of adb shell commands in tests:
* stopUser and ACTION_USER_STOPPED
* waitForBroadcastIdle
- Changed the documentation for switchUser to correctly
reflect that it accepts CREATE_USERS
Test: verfied that tests can access the APIs
Bug: 181030374
Change-Id: I92b92471a18cf97a118d3f1946d6e06c277a76f1
* changes:
Remove app links caller BROWSABLE requirement
Fix DomainVerificationShell user/allowed bugs
Remove pending/restored domain state when attaching
Check user ID for domain verification setters
Expose error codes for domain verification setters
Move domain state ints to DomainVerificationInfo
Migrate approved/denied domain states and add tests
As part of an upcoming feature, developers will need the ability to
clearly communicate that they'll never use a permission derive the
physical location of the device, regardless of ACCESS_FINE_LOCATION
and/or ACCESS_COARSE_LOCATION being granted. The first use of this
is the BLUETOOTH permission, but developers may need to communicate
this for other permissions such as READ_PHONE_STATE, etc.
This change begins parsing this developer declaration as one of
multiple "usesPermissionFlags", which are then stored in a new
ParsedUsesPermission object. To minimize refactoring, we continue
to offer this data through the older String-based APIs.
Bug: 181812281
Test: atest FrameworksServicesTests:PackageParserTest
Test: atest com.android.server.pm.parsing
Test: atest -p core/java/android/content/pm \
core/java/com/android/internal/content \
services/core/java/com/android/server/pm \
services/tests/servicestests/src/com/android/server/pm
Change-Id: I2ccda05cf416653d311151591f91ae55a729e05b
Does not require BROWSABLE category on the caller side anymore to apply
app links logic. However, it is now enforced on the receiver side, such
that all IntentFilter matches must contain BROWSABLE to be considered
approved for a domain.
Bug: 181890795
Change-Id: I8d5a10c3b8cc2370a4a69d4abe9ee74b1964f19e
Removes the InvalidDomainSetException and exposes the reasons as API
error codes. Implementers can check for a non-0 error code to tell if
the failure is meant to indicate a cancelled request.
Bug: 180991102
Test: atest com.android.server.pm.test.verify.domain
Test: atest DomainVerificationManagerApiTest
Change-Id: I19b88fb582fc7f633497d036a0590350ec463f3e
Insets source window can be moved by the display area policy so that
the window would not on the edge of the display. This makes the window
cannot provide insets to the display frame. The default animation uses
the display frame to compute insets, so the moved types cannot be
animated properly.
This CL adds an insets hint to InsetsSourceControl. It is the insets
computed from its owning window bounds. With the insets hint, the insets
animation can be played regardless of the display frame.
This CL also fixes an issue that the insets animation would be played in
the wrong direction by the fixed-rotation window.
Bug: 175775686
Fix: 181939099
Fix: 163018915
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
InsetsControllerTest InsetsSourceConsumerTest
DisplayImeControllerTest
WindowInsetsTests (manual)
Change-Id: Ic6a8a215bd9b3a3b1af18e425dabe803c9be323e
We define three change ids in this change:
OVERRIDE_MIN_ASPECT_RATIO
OVERRIDE_MIN_ASPECT_RATIO_MEDIUM
OVERRIDE_MIN_ASPECT_RATIO_LARGE
Depending on which change ids are enabled, we override the minimum
aspect ratio of a given app to the value corresponding to the treatment.
Bug: 174042980
Test: atest WmTests:SizeCompatTests
Change-Id: I2db2a3acbd051b651b7ab0dc4c51c38a0276430b
Hides the internal values and exposes a smaller set of defined values
for each specific case the domain verification agent might be
interested in.
These values are only for the public API output and all other classes
should continue to use the internal DomainVerificationState.
Bug: 181100856
Test: atest com.android.server.pm.test.verify.domain
Change-Id: I2b16d14bbf3a70e4c2e3f4b358af8671aed71490
Allows shell configured values to persist across package updates and
validates the behavior with new unit tests.
Also fixes a bug with failing to recalculate hasAutoVerifyDomains
during an update.
Bug: 180535047
Test: atest DomainVerificationPackageTest
Change-Id: I793171491c8373ad67a38b5a02a57f46e4d5828a
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.
ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.
So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.
Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
Replace all constants and methods to reference the newly added
PowerExemptionManager.
Also keep Context#POWER_EXEMPTION_SERVICE hidden to discourage use of
getSystemService(String). It is still a TestApi for CTS purposes.
Bug: 180503057
Test: atest PowerExemptionManager
Test: atest PowerWhitelistManager
Change-Id: I52c24b79acf7a9ec9fce138d4cb0818b5480e2a0
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.
Bug: 182370679
Test: m update-api
Merged-In: I30b1b146dcae82926be7bdb8b343635a01eabefe
Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
Create a new intent for launching the unused apps UI page from
outside permission controller module.
Bug: 181172051
Test: Built successfully
Change-Id: I3f601425659a88f20683c0a1b1ab318f2b4e5ecf
With the getUserState public API, the constant should also be exposed
so that apps that wish to use that mechanism can access it.
Bug: 180955393
Test: builds
Change-Id: I98aa9a63eefc0480ddbf3107b91f76f0a2791f6b
This CL adds support for subattribution when sendBroadcast(Intent,
String) is used with an appop permission. This adds the new
android:attributionTag attribute to manifest receivers.
Fixes: 182313296
Test: atest AttributionTest
Change-Id: Ib315f95678204bc03e7ac354c54afbd64db403e8
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.
Bug: 182370679
Test: m update-api
Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
This is essentially identical to PowerWhitelistManager which will be
deprecated due to the use of non-inclusive language.
Bug: 180503057
Test: atest PowerExemptionTest
BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing public API.
Change-Id: Ie6ff50118330e22b59a547c81952a31a5f5b54d8
With this change, text classification is performed on text in clip
data when it is set as the primary clip, if it is below a certain
length.
This allows information about which entities (e.g. URLs, addresses)
are present in the text to be added to the ClipDescription.
With toast notifications being added when an app accesses clipboard,
this change will allow apps to tell if clipboard contains information
they are interested in before they access the clip data. This will
allow unnecessary clipboard accesses to be avoided.
If entities are detected in the clip data, the results of classification
are added to the ClipData so that users of this API do not then need
to repeat text classification themselves in order to locate the
entities.
Bug: 180577441
Test: new CTS tests added to ClipDescriptionTest
Change-Id: I334db4805b8b72e0e00c721fe6efe64ec0661a8a
We're defining a new compat framework change id that indicates whether a
given app should be force non-resizable.
Bug: 181136395
Test: atest WmTests:SizeCompatTests
Change-Id: Ibd91bc8fe3da57f17e32fa8efaf98c51fe4dd677