scanPackages was called whenever it receives a broadcast,
which could be duplicated.
This CL adds a boolean variable (mScanPackagesScheduled) not
to scan packages if it is scheduled.
Bug: 153527463
Test: cts test, atest mediarouertest and check
MediaRouteProvider#onBind, #onUnbind are called
when a new provider is installed.
Confirm # of calls is reduced (3 -> 1).
Change-Id: Iaa423b7d1b2b2a97aebed0001b4077bdf95b1d54
Add logic for dexopt-ing system server dex files. The files
are managed by the DexManager and need special dexopt
arguments.
As such, they have a dedicated dexopt path, that can be
initiated from DexManager. (The arguments are what we currently
use in ZygoteInit#performSystemServerDexOpt)
Test: adb shell cmd package dexopt android
presubmits
Bug: 148774920
Change-Id: If0c0457f8045e8f475815136fb5ae2f340eb6661
when a app call setMode to set mode to non MODE_NORMAL modes many times with different audio managers in the same process, in this case the "pid" parameters are the same and the "cb" parameters are not the same, then the parameter "cb" registered and the "mCb" in hdlr are not the same, then NoSuchElementException will happen, and when the app was cleared in recent tasks the audio mode will not be reseted to MODE_NORMAL by expected flow.
Bug: 153649105
Test: AudioManagerTest#testAccessMode, CallDetailsTest#testSetVoipAudioMode
Test: manual cell and voip call
Signed-off-by: wumin3 <wumin3@xiaomi.com>
Change-Id: Ifb8c66372a8e994edcea628cad7dc2a7ee4763a6
Merged-In: Ifb8c66372a8e994edcea628cad7dc2a7ee4763a6
- Attempting to set the visiblity when the task org is set can happen too
early and cause the app to not draw and preventing taskAppeared().
Instead, move this to setHasBeenVisible() to be in line with other
cases in the system where we defer setting visibility until the apps
are good to go. However, if we do this, we also need the first draw
(including the starting window) to trigger setHasBeenVisible() to
ensure the task org can hide it in time (the task org will also want
to receive the task as soon as possible). As a result of moving it out
of when the task org is set on the task the PIP transition then also
has to defer setting the visibility of the activity until the first
draw.
- Also fix a case where we are dispatching task info change before
taskAppeared(). There's a brief period where the task has an organizer
set, but the task org state has not added that task yet or sent
taskAppeared() because it has not yet drawn. But in that state, config
changes still happen causing a task info changed call to the task org.
Bug: 152809695
Bug: 152134460
Test: Open a bubble, ensure that we don't see the task in fullscreen
first. Enter pip, ensure that we don't see flash of the task
before SysUI can fade it in.
Test: atest PipAnimationControllerTest
Test: atest TaskOrganizerTests
Test: atest SplitScreenTests
Change-Id: I7d2ca2a2e538f07c73fff79686e040c159c1dce3
- If the task is previously not visible or has no visible children at
the point when we start controlling it in the task org, hide the task
until we send taskAppeared to ensure that the task org can reparent
and show it otherwise we could see a flash of the task.
This happens mainly from two cases:
- when starting a new task with a given win mode, we show it and wait
for first draw before notifying the task org
- when transitioning into pip from swipe up, the activity is hidden
and when it requests to enter pip is made visible again
Since we are hiding the task w/ the pending transaction, we also need
to defer all task org callbacks until that's applied to ensure proper
lifecycle of the calls.
- Also skip app transitions for task org tasks for now
This reverts commit d2fb07e4f6.
Bug: 152809695
Bug: 152134460
Test: Open a bubble, ensure that we don't see the task in fullscreen
first. Enter pip, ensure that we don't see flash of the task
before SysUI can fade it in.
Test: atest PipAnimationControllerTest
Test: atest TaskOrganizerTests
Test: atest SplitScreenTests
Change-Id: I9f1fc5931df1d69a7086c02b633347162cda94bf
In quick switch flows, launcher will first swipe task snapshot
through recents animation, and then start new task with custom animation
options through startActivityFromRecents after gesture finish detected,
and then finish recents animation finally.
But that way user may experience flickering before the new task launch
and recents animation finish.
To improve quick switch flickering, we ignore the new task's custom
animation from recents and generate task remote animation target,
and then trigger a callback for launcher to control/animate this
task surface, more like a part of RecentsAnimation,
Also, adding removeTask method for launcher can flexibility remove the
new task animation target once no need to animate, so that launcher
can decide when to finish recents animation.
Bug: 152480470
Test: manual as below steps:
1) Doing quick switch task.
2) Make sure launcher can receive onTaskAppeared callback.
3) Make sure launcher calls removeTask successfully.
4) Make sure launcher can finish recents animation after 3).
Change-Id: I0692a280a49719229fa8871509bad37a1343a00f
Also, do not bind mount storage obb and data dirs if mount external is
in pass_through mode.
Fix: 151219235
Fix: 152395018
Fix: 152490627
Test: atest AdoptableHostTest
Change-Id: I77a86be5582ded0915b0a8a49d2b2a8c17fe58b7
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.
Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.
Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.
Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
The config overrides were only computed for leaf tasks. So, the
config of the organized tasks were inherited from the display,
which was still fullscreen size. This was not right especially
for split-screen organizer tasks because the configuration could
be used by the organizers.
Also remove requesting override windowing mode as fullscreen for
home tasks, the config was updated to fullscreen or
split-screen-secondary while resolving override config instead.
Bug: 152408408
Test: Enter split-screen and show IME
Change-Id: Ie6737cb5e9655c57724fc140c6b6fde3a96be6ab
ActivityStack#mTopActivityOccludesKeyguard may be
incorrectly updated by a non-top activity.
Bug: 149837574
Test: start emergency dialer from lockscreen
Change-Id: I830e572f008cbebb95f0d76416c70d948063dd97
This will be used by FlickerTests to capture composition state
in SurfaceFlinger trace.
Test: atest FlickerLibTest:LayersTraceMonitorTest
Fixes: 153563549
Change-Id: I3d09196ced43a1b0bac811e8f458c28be4e44992
When ApexManager switched from using ServiceManager.getService to using Binder.waitForService to retrieve apexservice, it lost the call to Binder.allowBlocking that was inside getService. Since ApexManager currently makes several synchronous binder calls, this call is needed to avoid Log.wtf()s.
Bug: 153360345
Test: atest ApexManagerTest
Change-Id: I6016477b20754a6dc0f31588bae4e679f08a1ba2
We've heard reports that some ContentProviders are sensitive to their
notifications being delayed, so this change adds a NOTIFY_NO_DELAY
flag that they can use to bypass any background delays.
Bug: 149370968
Test: none
Change-Id: I0465c8dee92cd5708c04035bc0396ce2d1083f67
To avoid misunderstanding while checking the log.
Bug: 143573504
Test: CtsAppTestCases:ActivityManagerTest#testAppNotResponding
Change-Id: I162aab785cd83db5db6cb33279f0b4ab0a458e94
As the final enabler for the BLASTSyncEngine, we add a new relayout
result BLAST_SYNC. If the WindowState is participating in a BLAST sync
during relayout we return it to the client. If we return it to the
client the client will direct it's next draw in to a BLAST transaction
and report that transaction via finishDrawing. You can now observe
the BLASTSyncEngine working end to end in TaskOrganizerMultiWindowTests.
We do a few small clean-ups in TaskOrganizerMultiWindowTest while we
are there.
Bug: 153561718
Test: TaskOrganizerMultiWindowTests
Change-Id: I719b731350b942aafa444a33972aaef8973422ea
If a non-resizable activity can fill the non-decor space,
its bounds should not exclude decor bounds because the
activity and decor can show as a continuous area. otherwise
unexpected letterbox may be created and IME cannot attach
to it due to the activity doesn't match parent's bounds.
Fix: 152197007
Test: SizeCompatTests#testAspectRatioMatchParentBoundsAndImeAttachable
Change-Id: I61d2c99702fb8642a3bf5728949489b6b98eb508