Skip to content

Conversation

@omsn1528
Copy link

@omsn1528 omsn1528 commented Jan 1, 2026

Summary

This PR proposes adding support for Android's Combined Audio Device Routing APIs (Android 12+)
to enable simultaneous audio output to multiple Bluetooth devices.

Scope

  • AudioPolicyManager handling of multiple preferred output devices
  • SystemUI media output picker multi-device selection
  • Graceful fallback for devices without multi-stream Audio HAL support

References

https://source.android.com/docs/core/audio/combined-audio-routing
https://developer.android.com/reference/android/bluetooth/BluetoothLeAudio

Note

This PR is a proposal and documentation reference intended to start discussion
and guide future implementation.

Requesting review and feedback from the crDroid maintainers.

rmp22 and others added 30 commits December 31, 2025 23:46
…ny task bar is enabled

Change-Id: Ie18eb94201b580141c3d1ee92bc353ecdb893b41
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I2d46e97668c7f1bec3f68ff41e82027aea8e3526
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: Iaa15dda08d614d01fae64ae2b5aa72f50513af99
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I6c7660017947446ad2b803ca9febb56f5d977cf6
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This is an addon for GameSpace for broadcasting about game start/stop.
Additionally, it also has special option for suppressing fullscreen
intent like incoming call.

This also squash commits:
- SystemUI: Improve GameSpace lifecycle and broadcast handling
- GameSpaceManager: Handle various case against "locking screen" scenario
- GameSpace: Fix issue with multiple users [neobuddy89]
- SystemUI: Update gamespace for A13 [Genkzsz11]
- GameSpaceManager: restrict broadcast to MANAGE_GAME_MODE holders only
- GameSpaceManager: Update TaskStack listener usage
- GameSpaceManager: Updated for A14 QPR1 [neobuddy89]

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
GTS don't allow any app to have the android.permission.WRITE_DEVICE_CONFIG permission
i.e we can't modify device_config property from our game space.

So write the property to our custom Settings.Secure.GAME_OVERLAY.
Then observe the value changes and set the property to the
device_config from here.

Since GameManagerService is a part of system_server,
GTS will be happy.

Change-Id: I0ebbcd6188411a583fa53904e6153482f342a03e
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
…observer onChange

* this could lead to potential increase of cpu usage in system_server

Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: Id62b90dd37e6062792180cfdb19cb3a4fb371d3f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I80c23dbfe900253510d027c891b2e6f441c45132
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* We fixed issue of multiple gamebar instances in crdroidandroid/android_packages_apps_GameSpace@543b89b
* However, the core reason of multiple gamebar was due to the
  fact that previous gamebar didn't exited properly.
* This is likely AOSP issue where onTaskStackChanged() is not
  reporting in-game exit properly.

Ref: crdroidandroid/issue_tracker#556
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Inspired by: RisingTechOSS/android_frameworks_base@02780e2
* Listener originally authored by: Henrique Silva <jhenrique09.mcz@hotmail.com>

Co-authored-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I8923576139ba0e034df7fb14311e69be886cc9c2
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Match OEM behavior:
- Lock swipe gestures from bottom, left & right side
- Require double swipe to unlock gestures
- Auto relock gestures after intervals
- Avoid showing NavigationBar / TaskBar when swiping from status bar / left & right side

Change-Id: I58b5362e19aef6f134b14ef8427bbf35d3dbbd57
Signed-off-by: cjh1249131356 <cjh1249131356@gmail.com>
[YumeMichi: Port to 14]
Signed-off-by: Yuan Si <do4suki@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I1d47b529aa35f4021dccf7d2b6dc013c0ac43c0c
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I1a6864f2b4d04fef3cf2e7633f01c6876023393d
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
automatically add/remove games to gamespace

Squashed:

    From: rmp22 <195054967+rmp22@users.noreply.github.com>
    Date: Thu, 17 Apr 2025 08:12:06 +0800
    Subject: [PATCH] GameSpaceManagerService: sanitize game list

    fixes malformed settings value:
    com.kurogame.wutheringwaves.global=2;com.mobile.legends=2;com.glohow.global.blackbeacon=2=1=1=1=1=1=1=1;com.mobile.legends=2;

    Change-Id: I7a905b54d603bee111032185a720044697764cc2
    Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>

Change-Id: I73c89e2ac1a078d540718d96437f1a66b9173587
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Use toast instead of notification with UI thread
* Add string for translation
* Fix multiuser usage
* Add background thread in broadcast receiver
* Switch to HashMap for cleaner implementation
* Handle NPE in isGame()

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: Dhina17 <dhinalogu@gmail.com>
Co-authored-by: minaripenguin <minaripenguin@users.noreply.github.com>
Co-authored-by: Nick <nift4@protonmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Block touch screen and keys inputs when device is in pocket.
* Safe-door to disable pocket lock within long press power button
  if sensors do not behave correctly after PocketManager.isDeviceInPocket()
  returns true.
* Window uses TYPE_SYSTEM_ERROR flag with ensure high
  priority over the lockscreen and other high priority windows.
* Do not illuminate buttons when pocket lock is showing.
* Disable fingerprint events and gestures when in pocket
* Be friendly towards Keypress Boost

Contributors:
Carlo Savignano <carlosavignano@aospa.co>
Chris Lahaye <dev@chrislahaye.com>
Anas Karbila <anaskarbila@aospa.co>
Alex Naidis <alex.naidis@linux.com>
Park Ju Hyung <qkrwngud825@gmail.com>

Ticket: NOUGAT-15

ZeNiXxX
* Fix  booting issues
* Fix  NPEs
* Bring to Android 10

DennySPb: adapt for 11, 12

Squashed:

    From: Carlo Savignano <carlosavignano@aospa.co>
    Date: Tue, 29 Oct 2019 16:43:22 +0100
    Subject: pocket: introduce pocket judge

    ZeNiXxX
    * Bring to Android 10

    DennySPb: adapt to 11, 12

    Change-Id: I33153b451f5d38d83e226be0f76bda1ed022dd48
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Chris Lahaye <dev@chrislahaye.com>
    Date: Tue, 26 Sep 2017 19:19:19 +0200
    Subject: pocket: Add hardware acceleration and properly maintain
     SYSTEM_UI flags

    Change-Id: I585598242beec34bd92c5df5836ab395b36cea05
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Alex Naidis <alex.naidis@linux.com>
    Date: Mon, 14 Aug 2017 20:56:16 -0400
    Subject: PocketService: Adjust light sensor rate to 400ms

    We already adjusted the proximity sensor rate to
    400ms, so adjust the rate for the light sensor
    accordingly and create a tunable.

    Change-Id: Ie6dda80df8cdc677eb6cdb873a5ce1e888572fe7
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: TheStrix <parthbhatia98@gmail.com>
    Date: Wed, 6 Mar 2019 14:40:06 +0530
    Subject: pocket: Adjust sleep timeout for pocket lock view to 10 secs

     - Fix the case where user sets a high value for sleep timeout in display settings
       and the pocket view is also displayed for that much duration.

    Change-Id: If6c4daa1fd98992141f22db70e0e86d5d990f789
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: TheStrix <parthbhatia98@gmail.com>
    Date: Wed, 6 Mar 2019 20:02:08 +0530
    Subject: pocket: Fix pocket lock view for display cutouts

     - Use LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES layout
       flag to extend pocket lock view for display cutout mode.

    Change-Id: I21e4e47cf999b3a0f3d6ebf9165ba9f5596ece0e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Henrique Silva <jhenrique09.mcz@hotmail.com>
    Date: Tue, 29 Oct 2019 17:40:41 +0100
    Subject: Pocket lock improvements

    * Fix auto hide not working correctly
    * Restore systemui visibility when hidden

    ZeNiXxX
    * remove faceunlock logic and adapt for android 10

    Change-Id: I61b38798d01775b252af88abb01dd2423b3a7638
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Anushek Prasal <anushekprasal@gmail.com>
    Date: Sat, 11 May 2019 23:43:56 +0530
    Subject: pocket: Use MD2 lock drawable

    Change-Id: Ifb89a68505a9f9b401a2474b5179ea65e9c0e3ce
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: RadixCube <radixcube@gmail.com>
    Date: Sun, 2 Jun 2019 18:14:51 +0000
    Subject: pocket: Reduce sleep timeout for pocket lock

    *if the proximity value changes within 10s, pocketlock exits to lockscreen. Inorder to avoid that reduce timeout to 3s

    Change-Id: Iee08801534bebacc2fc62f0bc6e3a0712ce12712
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Chris Lahaye <dev@chrislahaye.com>
    Date: Tue, 29 Oct 2019 17:37:17 +0100
    Subject: pocket: introduce pocket bridge

    This service communicates pocket state to the pocket judge kernel driver.
    It maintains the pocket state by binding to the pocket service.

    Ticket: NOUGAT-49

    Change-Id: Iee77f767f23d3f77a0d1d871f9305f3b3c6d6630
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Date: Thu, 2 May 2019 21:35:51 -0300
    Subject: Pocket lock: Add config_pocketModeSupported overlay

    Change-Id: I6768c9f8cdd40b2a62df3bd9ddfa04022d69ce10
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: jhenrique09 <jhenrique09.mcz@hotmail.com>
    Date: Tue, 8 Sep 2020 09:44:29 -0300
    Subject: PocketLock: fix flickering on animations

    Change-Id: I4b5499042d0e9ae8f73ecf5c32030d146f640362
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: DennySPb <dennyspb@gmail.com>
    Date: Thu, 28 May 2020 20:59:47 +0300
    Subject: PocketJudge: allow register vendor pocket sensor

    Some devices (ie OnePlus) have own pocket sensor. This change allow to use
    native pocket sensor instead of proximity and light.

    Sensor name must be specified in device tree overlay.
    In this case PocketService will try to use vendor sensor first.
    If sensor wasn't found, fallback sensors (proximity and light) will be in use.

    Example for OnePlus sensor:
    <string name="config_pocketJudgeVendorSensorName">oneplus.sensor.pocket</string>

    Change-Id: Ibe423478cfd9d49e0831e2df0af793178f62c0e0
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: paphonb <paphonb@gmail.com>
    Date: Sat, 8 Jun 2019 08:37:35 +0000
    Subject: Fix an edge case in KeyguardUpdateMonitor pocket callback

    Change-Id: If872c365ab22bd744c610b136b442ff161c65522
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Jyotiraditya Panda <jyotiraditya@aospa.co>
    Date: Sat, 27 Feb 2021 20:32:26 +0530
    Subject: base: Redo Pocket mode view like OOS

    Change-Id: I037f5120315581cade60b6c11a64b07cc47ba376
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Anushek Prasal <anushekprasal@gmail.com>
    Date: Sat, 22 May 2021 21:30:08 +0530
    Subject: SystemUI: Improve pocket mode layout

    Change-Id: I590bc187a5e205102b129fbb9e3625f51b532afd
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Laker <lakerman1987@gmail.com>
    Date: Fri, 5 Feb 2021 19:43:44 +0300
    Subject: PocketLock: Make using light sensor optional

    * On some devices using light sensor may break autobrightness

    Change-Id: I2bb4aad1ecc6808a4546dfdcada4335074d0d40e
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Hikari-no-Tenshi <kyryljan.serhij@gmail.com>
    Date: Sat, 10 Jul 2021 22:21:34 +0300
    Subject: PocketJudge: Allow to register vendor proximity sensor

    Some devices (ie OnePlus) have bunch of proximity sensors
    and default one may not work properly. This change allow to use
    particular proximity sensor.

    Example for OnePlus infrared proximity sensor:
    <string name="config_pocketJudgeVendorProximitySensorName">oneplus.sensor.infrared.proximity</string>

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Ido Ben-Hur <idoybh2@gmail.com>
    Date: Sat, 10 Dec 2022 12:54:11 +0200
    Subject: base: Pocket Judge: Don't go to sleep while on call

    This causes gdialer to stop vibrations. Let's not.

    Also:
    * Use TYPE_SECURE_SYSTEM_OVERLAY for the pocket lock view to actually overlay above everything
      (see com.android.server.policy.WindowManagerPolicy for a full list of priorities)

    Change-Id: I567381d7805a2c3917fca027d3df4e5f6ed508a4
    Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Ido Ben-Hur <idoybh2@gmail.com>
    Date: Sat, 10 Dec 2022 01:56:52 +0200
    Subject: PhoneWindowManager: Pocket Judge: Don't mess with power button to reject call

    Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
- New illustration created by Radosław Błędowski <rkbdi@aospa.co> for Paranoid Android

Change-Id: Ic224319a7c282158fc1a1855293afb02e056b6ef
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Not all devices report 1.0 on their pocket mode sensor, Xiaomi for example report 1 if possibly in pocket and 2 if definitely in pocket by their NonUI sensor

Change-Id: Ided2497200153a411ee80484573009a527d34e50
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I2784c23ad456e1ce5b042e5cc31f919f6b5a5436
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* This is complete rewrite for refactored code.

Original Ref: crdroidandroid@f267ab0
Co-authored-by: ezio84 <brabus84@gmail.com>
Co-authored-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
WTF google??? this was always true by default. you have a config set to 1 as well.
Please stop smoking.
Consistency was killed with this change introduced in QPR2:
https://android.googlesource.com/platform/frameworks/base/+/14a03f2418f4c2c74a9346f435094358b41af308
I expect it to be fixed by google down the road.
Squashed:

    From: someone5678 <someone5678@users.noreply.github.com>
    Date: Sun, 30 Jun 2024 18:35:59 +0900
    Subject: fixup! Allow to suppress notifications sound/vibration if screen is ON [1/2]

    * Also apply it to NotificationAttentionHelper

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

    From: Pranav Vashi <neobuddy89@gmail.com>
    Date: Tue, 23 Jul 2024 01:12:58 +0530
    Subject: fixup! Allow to suppress notifications
     sound/vibration if screen is ON [1/2]

    * We forgot to load settings on boot.

    Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Change-Id: I279b202682939d797d3116089f50d65e3dd3eb01
Signed-off-by: Jabiyeff <cebiyevanar@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
neobuddy89 and others added 29 commits December 31, 2025 23:46
* Remove animation to prevent flickering when screen turns on.

Fixes: crdroidandroid/issue_tracker#459

[HELLBOY017]: Don't kill scrim animation just force the tint on black for keyguard

Co-authored-by: Abhay Singh Gill <abhaygill017@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Abhay Singh Gill <abhaygill017@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Otherwise we see a white flash bang in light theme when going to ambient screen
  this is the same fix done to visually hide the alpha on KEYGUARD scrim transition
  animations as well.

Change-Id: I052d10f76c67f32dd75f2584ad67b8e7d8a165dd
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Without this, whenever unlocking the device in dark mode, there would be a black tint visible for a bit.

Change-Id: I107239a3485ddfcdee994c99490c7337c858d31a
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* ScrimState is not recomputing as it never re-prepares ScrimState on UI mode change.
* Cancel any running animators to fix tint flicker during an ongoing animation.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I906c2335a08e6ac43a40ff0b1411c900b2f0a874
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Root Cause:
 The function convertAudioGainConfigToNative forgets to call ReleaseIntArrayElements
to release memory after calling GetIntArrayElements.

Bug: 444915885
Test: atest

Co-authored-by: Zheng Xiaoying <zheng.xiaoying@gm.com>
Change-Id: Ifa323280d744cb82ae6ae648f04aa31000c5ba06
Add null check for string parameter in writeUTF() method to prevent
NullPointerException when attempting to call length() on null string.

This fixes a security vulnerability where entering "adb shell service
call notification 28" would cause system process crash and phone reboot
due to unhandled null string parameter.

Bug: Security vulnerability in Android 14
Test: Verified no crash when writeUTF() receives null parameter
Change-Id: If9dc9ab2b3aefd84f93c603300c0cee69d93a4b7
Currently, Binder calls to dump application components (e.g.,
dumpService, dumpActivity) are handled by posting a message to the
application's main thread. This can lead to Application Not Responding
(ANR) errors if the component's dump() implementation involves slow I/O
or long-running operations.

This issue is frequently observed during bug report captures, where
dumpsys calls into many processes. A service with a verbose dump
implementation can block its main thread for several seconds, triggering
an ANR.

This change fixes the issue by offloading all dump operations from the
main thread to a dedicated, single-thread executor within
ActivityThread.

Changes:

1. **Introduced sDumpExecutor:** A new static
Executors.newSingleThreadExecutor is added to ActivityThread. A
single-thread executor is chosen to ensure that multiple dump requests
for a single process are executed sequentially, preserving order and
preventing potential race conditions within the dumped component. The
thread is named "dump-thread" for easier debugging.

2. **Modified ApplicationThread Dump APIs:** The implementations of
dumpService, dumpActivity, dumpProvider, and other related dump methods
are changed. Instead of using sendMessage() to dispatch to the main
thread's handler, they now submit a Runnable to the sDumpExecutor.

3. **Direct Execution of Dump Logic:** The Runnable directly invokes the
existing handleDumpService(), handleDumpActivity(), etc., helper
methods. This reuses the existing dump logic but executes it on the
"dump-thread" instead of the "main" thread.

4. **Handler Cleanup:** The corresponding DUMP_SERVICE, DUMP_ACTIVITY,
etc., cases in the ActivityThread.H handler have been removed as they
are no longer used.

Bug: 446148250
Signed-off-by: Parijat Banerjee <pbanerj2@ford.com>
Change-Id: Icaff63f1ab004c18c6424834c5902b5b417b536c
[Details]:
Change SaveUi dialog gravity from BOTTOM | CENTER to CENTER to prevent the dialog from overlapping with the system navigation bar.
This ensures the dialog will not be covered in any scenario.

Test:
run cts -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SessionLifecycleTest#testDatasetAuthResponseWhileAutofilledAppIsLifecycled

Signed-off-by: ezra hu <ezra.hu@mediatek.com>
Change-Id: I769e58b55caa3edd78dcf410017d023fda0dcde6
Bug: none
Flag: EXEMPT minor optimization
Change-Id: I234ddd6e7ce628eb54448dc1d8bc994d678aaccb
JavaBinder: *** Uncaught remote exception! Exceptions are not yet supported across processes. Client PID 20178 UID 10146.
JavaBinder: java.util.NoSuchElementException: Death link does not exist (NAME_NOT_FOUND)
JavaBinder: 	at android.os.BinderProxy.unlinkToDeathNative(Native Method)
JavaBinder: 	at android.os.BinderProxy.unlinkToDeath(BinderProxy.java:749)
JavaBinder: 	at com.android.server.wm.InputConsumerImpl.unlinkFromDeathRecipient(InputConsumerImpl.java:105)
JavaBinder: 	at com.android.server.wm.InputConsumerImpl.disposeChannelsLw(InputConsumerImpl.java:151)
JavaBinder: 	at com.android.server.wm.InputMonitor.destroyInputConsumer(InputMonitor.java:189)
JavaBinder: 	at com.android.server.wm.WindowManagerService.destroyInputConsumer(WindowManagerService.java:7494)
JavaBinder: 	at android.view.IWindowManager$Stub.onTransact(IWindowManager.java:3071)
JavaBinder: 	at com.android.server.wm.WindowManagerService.onTransact(WindowManagerService.java:1810)
JavaBinder: 	at android.os.Binder.execTransactInternal(Binder.java:1433)
JavaBinder: 	at android.os.Binder.execTransact(Binder.java:1372)
AndroidRuntime: java.lang.IllegalStateException: Invalid usage after release of Surface(name=Input Consumer recents_animation_input_consumer#368691)/@0x64f6925
AndroidRuntime: 	at android.view.SurfaceControl.checkNotReleased(SurfaceControl.java:2101)
AndroidRuntime: 	at android.view.SurfaceControl.-$$Nest$mcheckNotReleased(Unknown Source:0)
AndroidRuntime: 	at android.view.SurfaceControl$Transaction.checkPreconditions(SurfaceControl.java:3497)
AndroidRuntime: 	at android.view.SurfaceControl$Transaction.hide(SurfaceControl.java:3764)
AndroidRuntime: 	at com.android.server.wm.InputConsumerImpl.hide(InputConsumerImpl.java:128)
AndroidRuntime: 	at com.android.server.wm.InputMonitor.resetInputConsumers(InputMonitor.java:230)
AndroidRuntime: 	at com.android.server.wm.InputMonitor$UpdateInputForAllWindowsConsumer.updateInputWindows(InputMonitor.java:671)
AndroidRuntime: 	at com.android.server.wm.InputMonitor$UpdateInputForAllWindowsConsumer.-$$Nest$mupdateInputWindows(Unknown Source:0)
AndroidRuntime: 	at com.android.server.wm.InputMonitor$UpdateInputWindows.run(InputMonitor.java:150)
AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:995)
AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:103)
AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:265)
AndroidRuntime: 	at android.os.Looper.loop(Looper.java:358)
AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:85)
AndroidRuntime: 	at com.android.server.ServiceThread.run(ServiceThread.java:49)
AndroidRuntime: Caused by: java.lang.Throwable: Released
AndroidRuntime: 	at android.view.SurfaceControl.release(SurfaceControl.java:2048)
AndroidRuntime: 	at android.view.SurfaceControl$Transaction.remove(SurfaceControl.java:5883)
AndroidRuntime: 	at com.android.server.wm.InputConsumerImpl.disposeChannelsLw(InputConsumerImpl.java:150)
AndroidRuntime: 	at com.android.server.wm.InputMonitor.destroyInputConsumer(InputMonitor.java:189)
AndroidRuntime: 	at com.android.server.wm.WindowManagerService.destroyInputConsumer(WindowManagerService.java:7494)
AndroidRuntime: 	at android.view.IWindowManager$Stub.onTransact(IWindowManager.java:3071)
AndroidRuntime: 	at com.android.server.wm.WindowManagerService.onTransact(WindowManagerService.java:1810)
AndroidRuntime: 	at android.os.Binder.execTransactInternal(Binder.java:1433)
AndroidRuntime: 	at android.os.Binder.execTransact(Binder.java:1372)

Bug:447782737
Test:Manual

Change-Id: I4fd6d94f960b61429720a83b81f76976f2782676
Signed-off-by: huyuxin <huyuxin@xiaomi.com>
Avoids ANRs and excessive I/O by delaying the system APK summary scan, which was previously triggered inappropriately during the boot phase. The scan will now initiate 1 minute after boot if triggered within the initial 30 seconds.

Test: test steps are:
1.Install 60 APKs; All Logs, Data filled to 95%;
2.Close watchdog, open Sysdump;
3.Repeated restart for a long time (120h)

Bug: 414507692
Change-Id: I1d329484ac12d4763248bd9c650d15e8741aea5d
Language Settings crashing due to ConcurrentModificationException. The
structure of the map used for supportedLocaleInfos is being changed
while it's being read. One way to fix this is by creating a copy of map
for iteration.

bug: 420412904

Change-Id: Ideb02ac913f474edec5bb437574fb6da94344d0f
* Make AOSP switch DOZE_ALWAYS_ON_WALLPAPER_ENABLED functional and let user select.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: Ic7ba1db1a0845242cecb55e6012bf56f4329a30d
Signed-off-by: Ghosuto <clash.raja10@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I4b02afba05a2f1a72ce3282459fe61f7d29a7508
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Test:
* Press power button for power menu and then dismiss it
* Change UI mode
* Press power button again - it should colors matching new UI mode

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* Not sure where this is failing for main thread check.
* Let's remove assert check for dump function.

Log:

time: 1761829105393
msg: java.lang.IllegalStateException: should be called from the main thread. sMainLooper.threadName=main Thread.currentThread()=dump-thread
stacktrace: java.lang.IllegalStateException: should be called from the main thread. sMainLooper.threadName=main Thread.currentThread()=dump-thread
	at com.android.systemui.util.Assert.isMainThread(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:60)
	at com.android.systemui.statusbar.notification.collection.NotifCollection.dump(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:3)
	at com.android.systemui.dump.DumpHandler$Companion.dumpDumpable(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:21)
	at com.android.systemui.dump.DumpHandler.dumpCritical(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:31)
	at com.android.systemui.dump.DumpHandler.dump(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:8)
	at com.android.systemui.SystemUIService.dump(go/retraceme a0ed5d08cbafd6ceda3025e7580143a234574b99d67372ec0a205b5910abeaab:19)
	at android.app.ActivityThread.handleDumpService(ActivityThread.java:5389)
	at android.app.ActivityThread.-$$Nest$mhandleDumpService(Unknown Source:0)
	at android.app.ActivityThread$ApplicationThread.lambda$dumpService$0(ActivityThread.java:1521)
	at android.app.ActivityThread$ApplicationThread.$r8$lambda$OeHpPo9a5q6Dn6gB6isOwWv_X-E(Unknown Source:0)
	at android.app.ActivityThread$ApplicationThread$$ExternalSyntheticLambda8.run(D8$$SyntheticClass:0)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)
	at java.lang.Thread.run(Thread.java:1119)

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
The possible execution order of the code is on the UI thread:
1 Firstly,we post the delay  mDelegationIdleTimeoutRunnable into the
  UiHandler.
2 Secondly,the onInputEvent method is caaled,so the  mRecordingGesture
  or mRecordingGestureAfterStylusUp is true.
3 mDelegationIdleTimeoutRunnable is Executed due to timeout,so the
  mHandwritingBuffer is empty.
4 Finally,startHandwritingSession method is called,we call the get
  method of mHandwritingBuffer which is empty,so
  IndexOutOfBoundsException happen.

we should reset the the mRecordingGesture and mRecordingGestureAfterStylusUp value to false when timeout happen.

Bug: 459595388
Flag: bugfix
Change-Id: I28002bb90322db8d40a4c55d9102521def9cf52a
If the top activity is inherited from androidx.fragment.app.FragmentActivity.
When the back key is down, it will trigger return to the previous activity.
Then when the back key is up, the top activity is paused and didn't handle this event.
Then InputDispatcher will dispatch this up event to the next top activity.
And if the next top activity supported the predictive back, it will handle the action up event.
Then there will be two times return back which will be confused to the end user.

Bug: 459595399
Test: CtsVerifier 16_r2
         DEVICE ADMINISTRATION -> Device Admin Uninstall Test.
         OTHER -> TTS Test.
Change-Id: I806e67da1c09f946e5cb8bb2685f2cd4f086ad08
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: If1ee1cee46837d3fd19df46e8f737dd0c7f68cb4
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
RuntimeXfermode's internal blender object ref count must be handled
 correctly, sk_ref_sp will increment ref count, we should not
 increment any ref count, if we pass it to paint,
 then the paint will maintain the lifecycle of it.

Bug: 471578330

Test: new RuntimeXfermode object and set to paint and draw

Change-Id: I2572ee7d929414ca2495d2875706ff10b383afc3
If getAndVerifyPreorderedView returns null, dispatchDraw crashes with
NullPointerException. Add a null guard that logs and returns early to
prevent the crash.

Change-Id: I8fb8e2ff3aec6df12bcba1bf3da32942bf49eb41
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.