Revert "Verify IMS to get display and WM"
Revert submission 11823238-ims_ui_context
Reason for revert:
Broke the following tests:
android.os.cts.StrictModeTest#testIncorrectContextUse_GetDisplay
android.os.cts.StrictModeTest#testIncorrectContextUse_GetSystemService
android.os.cts.StrictModeTest#testIncorrectContextUse_GetViewConfiguration
But was submitted with a bypass.
Reverted Changes:
I688b46a92:Verify IMS to get display and WM
I172ceb2e1:Enable IMS and its config context to obtain UI com...
Bug: 157027563
Bug: 159795597
Change-Id: Id309faac0ac8f60ee0d92c26767a89f450ddc455
The reason is passed to app exit info so a given app can get more
information about why their app was killed in the event of permission
revoke.
Test: atest RevokePermissionTest ActivityManagerAppExitInfoTest#testPermissionChangeWithReason
Fixes: 159659620
Change-Id: Id711667eb2c1579ecb2a1b83a62af3cc7862d5f6
Internally, DownloadManager synchronizes its contents with MediaStore,
which relies heavily on using file extensions to determine MIME types.
To prevent these two databases from getting confused, this change
adjusts DownloadManager to force the MIME type of already-completed
downloads based on the file extension, matching what MediaStore does.
Bug: 159594536
Test: atest PublicApiAccessTest#testAddCompletedWithoutExtension
Change-Id: I60c613eafcfe55007dffcac2d7d1fe375b753c19
This reverts commit 6d834d86fb.
Reason for revert: <http://b/159230864 WhatsApp image is visible after existing a chat>
Bug: 159230864
Change-Id: Ib266cff2e06a82ae9a0e85142ef80ae00328a040
In Android 10 additional restrictions were required to access the
subscriberId. The NetworkStatsManager has several methods that accept
a subscriberId of the mobile network for which usage should be queried.
This commit updates the docs for these methods to reference the new
access restrictions and offer null as an option to obtain the usage
for all mobile networks.
Fixes: 157871064
Test: m docs
Change-Id: I95c730c9418fced6312eb3ba4e0d69e6299f3ded
- in situation when developer provides message when op is noted, do not
report it through stack trace collection infrastructure
- collect only statcktraces for OP_FLAG_SELF and OP_FLAG_TRUSTED_PROXIED to
match collection of appops counts
Test: atest android.app.appops.cts.RuntimeMessageCollectionTest
Fixes: 159433071
Change-Id: I1ab56a530832873a1f1f68aba5ab6eabc9e8a17a
When a bubble is expanded, a virtual display turns on, an activity for
the bubble is resumed, and the activity draws contents on the virtual
display. The system waits until the contents is drawn, then shows the
contents in the bubble.
However, if size of the virtual display is changed after resuming the
activity, an app transition initiated by the activity is canceled, and
this sequence gets stuck. As a result, contents in the bubble is never
displayed.
Test: Manual.
Bug: 158675422
Change-Id: I3ba0805fd09f4dee36dae6a236b5b6fc7983e06b
The "App keeps crashing" dialog appears on Android TV even
though it should not. This would usually be accounted for
by setting mShowDialogs to false in the ActivityTaskManagerService
on boot. However, this does not happen because the service uses a
method of the ActivityTaskManager which pulls its configuration
from the context, which at this point is not yet updated to reflect
relevant values like the uiMode.
This change solves this problem by introducing an internal method
in the ActivityTaskManager, which acts on a given configuration
instead of the one from the context. This is helpful because the
caller ActivityTaskManagerService is holding on to the correct
configuration in the first place.
Furthermore, this change does not impact any outward-facing
behavior, nor does it introduce code duplication as the old
method of ActivityTaskManager new merely delegates its task
to the new one with the same configuration it would have
originally pulled from the context.
Test: Manually on ADT-3 device
Bug: 159019027
Change-Id: I0fac574a69a19243c2e62b967978ef5d8318ee51
Background
* Historically, when the screen capture disabled
policy was set on the personal profile, screen
capture was disabled for the whole device
(per-device).
* This should be changed to only be disabled in
the personal profile (per-profile).
Changes
* Renamed DevicePolicyCache methods to setScreenCaptureAllowed
and isScreenCaptureAllowed
* Added parameter ownerCanAddInternalSystemWindow to
isScreenCaptureAllowed
Bug: 148453838
Bug: 157035400
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: If1bd68f0ec3e88497c5d3b4382977b526b2364ba
Split-screen and activity-start were relying on resizeMode,
but that is what the activity requests vs how the system
actually treats a given task/activity. This caused some
inconsistencies in how non-resizable things were handled
when the developer option to force resizability was turned
on.
Also needed to fix an issue where non-leaf tasks would
get stuck with an out-dated intent. In particular, this
happened with the root HOME task which meant its
resizeMode could never change from that of FallbackHome.
Bug: 158514252
Test: enable force resizable in dev options and then launch
camera into secondary split.
Change-Id: If06d047813315f39894bead19d2cbe0c9444f254
There is a case in Bubble that we might release a un-initialized
TaskEmbedder while calling ActivityView.release() (ex. create a bubble
and don't expand it and then dismiss it) which will cause an exception.
Allow ActivityView.release() to be called at anytime and check the
initialization state before calling TaskEmbedder.release().
Bug: 155417004
Test: 1. Add bubbles and don't expands them then dimiss them
2. Check logs.
Change-Id: I583ddd36f407c908cb63c109834940fc91c8d130
This provides a signal for MediaProvider to whitelist access for full
external storage access.
Here is an overview of how the flow looks like:
1. When app is started within instrumentation with --no-isolated-storage
flag, ActivityManagerService will grant OP_NO_ISOLATED_STORAGE to that
package.
2. MediaProvider will note the OP_NO_ISOLATED_STORAGE app op as fallback
in case app doesn't have MANAGE_EXTERNAL_STORAGE permissions.
3. When instrumentation finishes, ActivityManagerService will change
mode of OP_NO_ISOLATED_STORAGE app op to MODE_ERRORED.
Test: atest ExternalStorageHostTest
Bug: 149894531
Change-Id: I51cd87e5e887b887fd8ac7a1a7ffff208266ffa8
If the user is not unlocked, log at the warning level instead of error
to reduce logspam from non-direct boot aware providers.
Fixes: 148747075
Test: manual (observe logs before and after user unlock)
Change-Id: Icd0fb23982a78fb413f329da93b2ce01d37aca2a
Remove the debug code for feature:
1. Background started FGS while-in-use permission restriction
2. Foreground service type camera and microphone.
Bug: 158579189
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerApi29Test.java
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
atest cts/tests/app/src/android/app/cts/ActivityManagerProcessStateTest.java
Change-Id: I9669db918af3740509a090c3075d93588110cea1
Previously we add uid to PendingStartActivityUids at activity start.
Now we also add uid to PendingStartActivityUids at activity resumed
because we can not wait for updateOomAdj() to be run by a runnable that
WindowManager send to DisplayThread at activity resumed.
At ActivityManagerService.getProcessStatesAndOomScoresForPIDs(), if the
ProcessRecord is in PendingStartActivityUids, we hard code the
ProcessRecord to be PROCESS_STATE_TOP and FOREGROUND_APP_ADJ, ahead of
result of updateOomAdj() the comes later.
Bug: 155143386, 157180494
Test: Reproduce steps of 155143386, swipe between GCA and
Snapchat, camera access is allowed after swipe.
Change-Id: Ia11b0e3400e4df851b250beb01dcfda43580668b