Doc currently says "The method will return whether [the attribute] is equal to zero", which could be read as "returns true if the attribute is zero", which is incorrect. Rephrased as: "...returns false if the attribute is equal to zero, and true otherwise."
Change-Id: Ie7d763ac2784ecc3a7fb522b4fa583ec8d2644d4
BUG: 143049875
Test: make ds-docs
ag/9372503 put the order of reading preCreated from a UserInfo parcel
in the wrong spot. We fix it here.
Test: none
Merged-In: I4502e901ff2aac977c584fa8c5a3d1263be33572
Change-Id: I4502e901ff2aac977c584fa8c5a3d1263be33572
(cherry picked from commit e80af14d33)
Initial user creation is slow because the system must prepare per-user data (like storage and
permissions) whose cost is proportional to the number of pre-installed apps. On automovive's
reference implementation, it can take more than 10s, which is a bad user experience.
This change lets OEMs pre-create some users , so that high initial-creation cost is "paid" during
the initial boot. On automotive, it improves the creation of an additional user (or guest user)
in about 7s (from ~17s to 9s).
Bug: 111451156
Bug: 132111956
Bug: 140750212
Bug: 140868593
Test: manual verification
Test: atest FrameworksServicesTests:UserControllerTest#testStartTemplateUser_background
Merged-In: I81de1b5376dc9c42b63be8853d7204c88826401f
Change-Id: I81de1b5376dc9c42b63be8853d7204c88826401f
(cherry picked from commit c1ca4410e1)
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.
To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.
In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.
Test:
atest com.android.settingslib.location.RecentLocationAppsTest
atest CtsPermissionTestCases
added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess
bug:141028068
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
Change-Id: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
1. If a previous version of an app doesn't declare internet permission;
2. The User upgraded it to a new version and the new one does declare the
internet permission;
3. The new app are not allowed to access the internet until next boot
Bug: 137864893
Test: Manual, just make sure the onPackageChanged would be executed on package changes
Change-Id: I69cdbb16a027a9c4e974b32371b1f64a23a51a23
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
If an app doesn't have a launcher activity enabled by default, a
synthesized activity isn't created for that app.
Test: make ds-docs -j32
Bug: 140968734
Change-Id: I2fe8666ee8cde479f404e43c622f03891d96c38f
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.
Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.
Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.
Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().
Merged-In: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
(cherry picked from commit f69c71e25889d8a9d66da05ee0f386d7fb626c6c)
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.
Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Change-Id: Id0e63ae4a7be578d1e93838b371320f86a787e0e
When the configurations are being read from the proto file, if a
duplicate locale is found in the list, an exception is thrown from
LocaleList which causes the UsageStatsService to crash. Instead, we'll
now log a WTF if duplicate locales are found when parsing the
configuration proto and not add the duplicate locale to the list.
Bug: 140197723
Test: atest UsageStatsDatabaseTest
Change-Id: Ie178b3cfdd45e6771a7c0e4bb42e47f79b5c30cc
(cherry picked from commit 5d9031dbee)
When the configurations are being read from the proto file, if a
duplicate locale is found in the list, an exception is thrown from
LocaleList which causes the UsageStatsService to crash. Instead, we'll
now log a WTF if duplicate locales are found when parsing the
configuration proto and not add the duplicate locale to the list.
Bug: 140197723
Test: atest UsageStatsDatabaseTest
Change-Id: Ie178b3cfdd45e6771a7c0e4bb42e47f79b5c30cc
The docs now (correctly) state that, if an intent filter specifies no
actions, then it only matches intents that don't specify/contain an
action.
Test: make ds-docs -j32
Bug: 140435265
Change-Id: I8931c6540cb22edd15e8caa1be984ca70efcdc96
As of Android Q, an app is included in the return value of
LauncherApps#getActivityList() unless it fulfills specific criteria.
This CL describes the conditions necessary for an app's activities
to *not* appear in the list.
Test: make ds-docs -j32
Bug: 130352392
Change-Id: I6a6e17351a6c1234229d1d7eb8147ee2c24ee2c9
No change to logic, only documentation.
This updates Context#getSharedPreferences docs:
* Fix a typo ("thead" -> "thread")
* Formatting: use <p> when appropriate, {@link} to other APIs, limit
the @param to only a single sentence
* Mention getSharedPreferences() may actually perform disk IO (this was
undocumented)
* Mention Editor#apply() as well as #commit()
Fixes: 140137651
Test: make docs
Change-Id: I245371d13d4f317c6c522debcdf7938ab783f897
As of Android Q, an app is included in the return value of
LauncherApps#getActivityList() unless it fulfills specific criteria.
This CL describes the conditions necessary for an app's activities
to *not* appear in the list.
Test: make ds-docs -j32
Bug: 130352392
Change-Id: Iad888a7a7f47d090da1b143ac152705577144d20
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
information added
So they are being moved back to the greylist for Q.
Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
Exempts this new ContentProvider for providing mainline module licenses.
Also sets ApplicationInfo.publicSourceDir for APEXes.
Bug: 135183006
Test: open module licenses, click app, verify file opens
Change-Id: Iec4f1de198525f7cd176a52d8448a2c71b6aabc0
Using this flag when binding to a service will
allow the bound process to be held at a low
oom_adj of 250, so that it can be expunged to
reclaim memory if a more user-visible app needs
it.
Use for bindings such as job services and other
connections that the caller can easily recover
from and restart if necessary.
Adjust the lmk thresholds to use this oom_adj
as one of the levels, so they're killed before
perceptible apps (such as foreground services).
Bug: 135219821
Test: CtsAppTestCases
Manually check notification listener oom_adj
and dumpsys activity services output
Change-Id: I9f6d0891d842e4d12f7995b9b1a8f57b0903a16d
The operation can potentially take a long time to complete
depending on the volume of data to be copied, so move it off
the ActivityManager handler thread that needs to be available
for other operations.
Bug: 134570017
Test: manual; set a 1 minute sleep in migrate_legacy_obb_data.sh
Change-Id: I3d2c52e8b012ed71c53810e6919d11be9a97cc6c
AppicationPackageManager.loadUnbadgedItemIcon would call
UserManager.getUserIcon if the icon was supposed to represent
switching to another the parent user (from a work profile).
However, that call requires extra permissions which may not be
available, which would cause a crash. The work profile doesn't
generally have permission to see the parent's icon, so rather
than showing the actual icon, a generic user icon is shown instead.
Bug: 134177607
Test: Manual confirmation: create a work profile and try to share a
picture (from Photos) to the personal profile.
Change-Id: Id79ca50b8e0a26593addbacf1a0ea709a2bc4da2