To indicate the intent is from text classifier, so apps can log
the traffic from text classifier.
Test: atest IntentFactoryTest
Test: atest TextClassifierTest
BUG: 120944241
Change-Id: I6584504a39c0db3c1de1eaab6915b26b30adadcd
This change adds the system APIs to query intent components and
application info, which is required for the Default apps UI in
permission controller to work for work profile.
Bug: 110557011
Test: build
Change-Id: I7e2d92f9ccae2e764a1ce0040a7f84bc4f21dbb5
If an app declares that is has flagile user data, all the user to choose
to keep the app-data on uninstall.
Test: Unistalled apps that set the new flag and app that did not.
Verified that the KEEP_DATA flag was set when checkbox was
clicked.
Change-Id: I032fb21854352bbc175934ae5eb68a1430b1d403
Fixes: 117578306
1. Add UsageStats Event types:
ACTIVITY_RESUMED is synonym to existing MOVE_TO_FOREGROUND.
ACTIVITY_PAUSED is synonym to existing MOVE_TO_BACKGROUND.
ACTIVITY_STOPPED when an activity becomes invisible on the UI.
2. In UsageStats.java, add API getLastTimeVisible() to report last time the
app is visible (ACTIVITY_RESUMED or ACTIVITY_PAUSED), add API getTotalTimeVisible()
to report total time the app is visible.
The existing API getLastTimeUsed() can report last time the app is in
foreground (AKA have focus).
The existing API getTotalTimeInForeground() can report total time the
app is in foreground (AKA have focus).
3. UsageStats.getTotalTimeVisible() can report screen usage for
split-screen mode and picture-in-picture mode.
4. Because in the same package, activity can be instantiated multiple times,
In UsageEvents.Event class, add a member mInstaceId for activity's
instance ID, add interface getInstanceId() to retrieve the instance ID.
Bug: 112002260
Test: frameworks/base/services/tests/servicestests/src/com/android/server/usage/UsageStatsDatabaseTest.java
atest frameworks/base/core/tests/coretests/src/android/app/usage/UsageStatsTest.java
Change-Id: Ibcef2488e9620804c9f9220b027f976e8fa0c98b
Allow apps to specify whether users should be able to edit smart replies
before sending them.
Bug: 111438374
Test: atest RemoteInputTest
Test: mp /vendor/google_experimental/users/cinek/Notify, post a notification with "Edit choices before send"
Change-Id: I9a37216916f05152d8ab7061ffa121948de0976a
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.
In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.
Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
1. It is required to set Person object when constructing a Message object
now. As it is very important to know whether the message is from
local user or remote user. Introduced PERSON_USER_REMOTE if
the caller just want a simple way to specify a remote user.
2. Use detectLanguages to detect the locale of the messages
If the model finds the detected language is not something
it supports, model may suppress smart reply.
3. Pass the reference time to the model. So model can resolve
the absolute time from a relative date string like "tomorrow 6pm".
BUG: 120809869
Test: atest ActionsSuggestionsHelperTest.java
Test: atest ConversationActionsTest.java
Change-Id: Ie079848e9b3d9bb8800f7f95d73e289e831968f8
- Adds @SystemApi to the work source apis. Work source will help us to
better understand who is responsible for resources usage (starting with
cpu usage)
- Adds @SystemApi to the transact listener to allow system apps to
intercept outgoing transactions in order to the set work source.
Bug: 111534779
Test: n/a - just adding annotations
Change-Id: Ie86696228bb9df57f640b978a1d78439c99626d3
The ModuleInfo class contains details about mainline modules. We're
not sure about what kind of information we'll need, so, creating
a placeholder structure and accessor methods that can be adjusted
later.
While the package manager does not know anything about what a "module"
is, we use the package manager as convenience to not creating a new
MainlineManager class.
Bug: 119220828
Test: Workspace still builds
Change-Id: I42cbc5e119652edd3eda155ddef861e3e0889479
This CL just adds the isStaged setting on SessionParams, and if it is
set the session info are cached in a local variable. This allows
getStagedSession() (new APIs) to return the session information.
This should unblock upstream development while we implement the feature.
Test: adb install --staged, adb install-multi-package --staged. Wrote
small app to verify getStagedSessions returns correct info.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Change-Id: I822be9e1737fe5cde6a6dd63621631cdef4f6fff
For apps that aren't the default gallery or music app, the new storage
model in Q only allows them to read media they don't own. We
recognize there's a valid use-case for editing or deleting media
that an app doesn't own, but we want to get the user involved to
confirm the access grant.
This is implemented using a RecoverableSecurityException, so
existing apps can continue gracefully handling a SecurityException
that they recognize. Apps that have become aware of the new
permissions model can extract the RemoteAction and invoke it to
get the user involved and gain access.
Bug: 111892459
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation
Change-Id: Ib34374197c8c1f5236ba8a1062065914e0a9e9f9