[Android] Using the AudioServiceActivity breaks a GoogleMap on system navigation change.
The google_maps_flutter plugin has issues with the custom Flutter Engine created by AudioServiceActivity in this plugin.
I'm not sure if this plugin's implementation is missing something or if the maps plugin is relying on something it shouldn't.
Because you know most about the actual implementation of AudioServiceActivity, I'm reporting it here first.
Platforms exhibiting the bug
- [x] Android
- [ ] iOS
- [ ] web
Devices exhibiting the bug
On these devices the google_maps_flutter platform view turns invisible.
- Samsung S25 Ultra, Anfroid 15.
- Samsung S20FE, Android 13.
- Lenovo Tab M10, Android 10
On these emulators I get an error in the console and the app crashes/restarts.
- Pixel 9A emulator, API 36.
- Pixel 4 emulator, API 29
Minimal reproduction project
Minimal reproduction project
Simply having a GoogleMap widget and using android:name="com.ryanheise.audioservice.AudioServiceActivity" is enough.
To follow your guidelines:
This forked branch can trigger the bug: https://github.com/timbotimbo/audio_service/tree/maps_bug
Using a functional Google Maps API key is not actually required, but it will make it easier to see the bug.
Details of changes
-
run
flutter pub add google_maps_flutter. -
Add a GoogleMap to the Column in MainScreen (main.dart).
const GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(50, 5),
),
),
- Add an API_key meta-data to the AndroidManifest.
<application ..>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="PLACEHOLDER"/>
Because your example is more complicated than needed for this reproduction, here is a simplified main.dart.
Simplified main.dart
Main.dart
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(const MaterialApp(home: WebViewExample()));
class WebViewExample extends StatefulWidget {
const WebViewExample({super.key});
@override
State<WebViewExample> createState() => _WebViewExampleState();
}
class _WebViewExampleState extends State<WebViewExample> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Example")),
body: SafeArea(
child: GoogleMap(
initialCameraPosition: const CameraPosition(
target: LatLng(50, 5),
),
),
),
);
}
}
Steps to reproduce
- Run the example on Android 10 or newer.
- Leave the app using the home or task switcher button/gesture.
- Change the gesture navigation mode in settings.
The location differs per device:
- Settings > Display > Navigation bar
- Settings > Display & touch > Navigation mode
- Settings > Gestures > System navigation
- Return to the app.
- On my emulators, this throws:
java.lang.RuntimeException: Unable to resume activity {com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.isFocused()' on a null object reference
- On my phsical phones and tablet, this make the GoogleMap turn invisible.
This only happens when the AndroidManifest contains:
android:name="com.ryanheise.audioservice.AudioServiceActivity" or
android:name="com.ryanheise.audioservice.AudioServiceFragmentActivity".
Changing that to ".MainActivity" will prevent the bug.
I've reproduced this on Flutter 3.32.8 and 3.24.5.
Expected results
Using AudioServiceActivity or AudioServiceFragmentActivity should help audio_service to function, but should not break other Flutter widgets.
The activity should not crash when a GoogleMap widget is present.
The activity should not break visibility of the GoogleMap widget.
Actual results
This plugin's custom activity causes the Google Maps platform view to break, or the app to crash when following the reproduction steps.
Screenshots or Video
Screenshots / Video demonstration
Video of the linked example, with and without API key, on a Samsung S25 Ultra.
Audio_service example, with and without API key.
https://github.com/user-attachments/assets/5c8acf22-68ef-4683-9e7d-86c96e3ed21b
https://github.com/user-attachments/assets/c3724bd2-7af6-4891-8da1-a52756ecd142
This second set of videos shows the difference between using MainActivity and AudioServiceActivity in the simplified example.
Simple example. Both MainActivity and AudioServiceActivity
https://github.com/user-attachments/assets/8d320b08-00c8-4ec6-83f5-19be2b206c09
https://github.com/user-attachments/assets/20fa6f40-798a-454a-801b-b9c19ed6e8f0
Logs
Crash message on emulators
D/AndroidRuntime(10096): Shutting down VM
E/AndroidRuntime(10096): FATAL EXCEPTION: main
E/AndroidRuntime(10096): Process: com.ryanheise.audioserviceexample, PID: 10096
E/AndroidRuntime(10096): java.lang.RuntimeException: Unable to resume activity {com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.isFocused()' on a null object reference
E/AndroidRuntime(10096): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5615)
E/AndroidRuntime(10096): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5648)
E/AndroidRuntime(10096): at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:73)
E/AndroidRuntime(10096): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:63)
E/AndroidRuntime(10096): at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:169)
E/AndroidRuntime(10096): at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:101)
E/AndroidRuntime(10096): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
E/AndroidRuntime(10096): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2823)
E/AndroidRuntime(10096): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime(10096): at android.os.Looper.loopOnce(Looper.java:248)
E/AndroidRuntime(10096): at android.os.Looper.loop(Looper.java:338)
E/AndroidRuntime(10096): at android.app.ActivityThread.main(ActivityThread.java:9067)
E/AndroidRuntime(10096): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10096): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
E/AndroidRuntime(10096): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
E/AndroidRuntime(10096): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.isFocused()' on a null object reference
E/AndroidRuntime(10096): at io.flutter.plugin.platform.VirtualDisplayController.resetSurface(VirtualDisplayController.java:294)
E/AndroidRuntime(10096): at io.flutter.plugin.platform.PlatformViewsController.onResume(PlatformViewsController.java:1086)
E/AndroidRuntime(10096): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onPostResume(FlutterActivityAndFragmentDelegate.java:588)
E/AndroidRuntime(10096): at io.flutter.embedding.android.FlutterActivity.onPostResume(FlutterActivity.java:840)
E/AndroidRuntime(10096): at android.app.Activity.performResume(Activity.java:9342)
E/AndroidRuntime(10096): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5605)
E/AndroidRuntime(10096): ... 14 more
I/Process (10096): Sending signal. PID: 10096 SIG: 9
Lost connection to device.
The linked audio_service example, logs start when leaving the app. (Samsung S25U)
I/ImeFocusController( 2655): onPreWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
I/ImeFocusController( 2655): onPostWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
I/VRI[AudioServiceActivity]@8fa042( 2655): handleAppVisibility mAppVisible = true visible = false
D/VRI[AudioServiceActivity]@8fa042( 2655): visibilityChanged oldVisibility=true newVisibility=false
I/SurfaceView@8062e1( 2655): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{8062e1 V.E...... ........ 0,0-1080,2340} of VRI[AudioServiceActivity]@8fa042
I/SurfaceView( 2655): 8413921 Changes: creating=false format=false size=false visible=true alpha=false hint=false visible=true left=false top=false z=false attached=true lifecycleStrategy=false
I/SurfaceView( 2655): 8413921 Cur surface: Surface(name=null mNativeObject=-5476376643569877536)/@0x84458a1
I/SurfaceView( 2655): 8413921 surfaceDestroyed
I/SurfaceView@8062e1( 2655): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{8062e1 V.E...... ........ 0,0-1080,2340}
I/SurfaceView@8062e1( 2655): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
V/SurfaceView( 2655): Layout: x=0 y=0 w=1080 h=2340, frame=Rect(0, 0 - 1080, 2340)
D/SurfaceView( 2655): 223799869 windowPositionLost, frameNr = 0
I/VRI[AudioServiceActivity]@8fa042( 2655): Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)8 dur=2 res=0x2 s={false 0x0} ch=true seqId=0
I/SurfaceView@8062e1( 2655): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{8062e1 V.E...... ........ 0,0-1080,2340} of VRI[AudioServiceActivity]@8fa042
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
D/VRI[AudioServiceActivity]@8fa042( 2655): Not drawing due to not visible. Reason=!mAppVisible && !mForceDecorViewVisibility
D/VRI[AudioServiceActivity]@8fa042( 2655): Pending transaction will not be applied in sync with a draw due to view not visible
D/ConnectivityManager( 2655): StackLog: [android.net.ConnectivityManager.unregisterNetworkCallback(ConnectivityManager.java:5571)] [m140.fey.d(:com.google.android.gms.policy_maps_core_dynamite@[email protected]:20)] [com.google.maps.api.android.lib6.impl.i.onTrimMemory(:com.google.android.gms.policy_maps_core_dynamite@[email protected]:54)] [android.content.ComponentCallbacksController.lambda$dispatchTrimMemory$1(ComponentCallbacksController.java:109)] [android.content.ComponentCallbacksController$$ExternalSyntheticLambda1.accept(D8$$SyntheticClass:0)] [android.content.ComponentCallbacksController.forAllComponentCallbacks(ComponentCallbacksController.java:124)] [android.content.ComponentCallbacksController.dispatchTrimMemory(ComponentCallbacksController.java:107)] [android.app.Application.onTrimMemory(Application.java:308)] [android.app.ActivityThread.handleTrimMemory(ActivityThread.java:7889)] [android.app.ActivityThread.-$$Nest$mhandleTrimMemory(Unknown Source:0)] [android.app.ActivityThread$ApplicationThread.$r8$lambda$G6hCvS-Qza2XVRHE5EG8OQS6lcg(Unknown Source:0)] [android.app.ActivityThread$ApplicationThread$$ExternalSyntheticLambda2.accept(D8$$SyntheticClass:0)] [com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:281)] [com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:204)] [com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:87)] [android.view.Choreographer$CallbackRecord.run(Choreographer.java:1751)] [android.view.Choreographer$CallbackRecord.run(Choreographer.java:1760)] [android.view.Choreographer.doCallbacks(Choreographer.java:1216)] [android.view.Choreographer.doFrame(Choreographer.java:1144)] [android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1707)]
D/HWUI ( 2655): CacheManager::trimMemory(20)
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
I/VRI[AudioServiceActivity]@8fa042( 2655): stopped(true) old = false
D/VRI[AudioServiceActivity]@8fa042( 2655): WindowStopped on com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity set to true
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
D/InputTransport( 2655): Input channel destroyed: 'ClientS', fd=293
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
I/ActivityThread( 2655): handleApplicationInfoChanged: updating resDirs from appInfo to activityInfo for locale overlays
I/ActivityThread( 2655): ApplicationInfo updating for com.ryanheise.audioserviceexample, new timestamp: 522915118
I/ActivityThread( 2655): assets removed: [/product/overlay/NavigationBarMode3Button/NavigationBarMode3ButtonOverlay.apk]
I/ActivityThread( 2655): assets added: [/product/overlay/NavigationBarModeGestural/NavigationBarModeGesturalOverlay.apk]
D/Choreographer( 2655): CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background states
D/HWUI ( 2655): CacheManager::trimMemory(40)
I/VRI[AudioServiceActivity]@8fa042( 2655): handleAppVisibility mAppVisible = false visible = true
D/Google Android Maps SDK( 2655): For capability in capabilities, log:
D/Google Android Maps SDK( 2655): "AdvancedMarkers: false: Capabilities unavailable without a Map ID."Data-driven styling: false
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
W/ProxyAndroidLoggerBackend( 2655): Too many Flogger logs received before configuration. Dropping old logs.
D/SurfaceView( 2655): 8413921 setAlpha: alpha=0.0
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
W/WindowOnBackDispatcher( 2655): sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda15@5a26eab
I/SurfaceView( 2655): 8413921 Detaching SV
D/SurfaceView@8062e1( 2655): updateSurface: surface is not valid
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
I/SurfaceView@8062e1( 2655): onDetachedFromWindow: tryReleaseSurfaces()
I/SurfaceView@8062e1( 2655): releaseSurfaces: viewRoot = VRI[AudioServiceActivity]@8fa042
D/VRI[AudioServiceActivity]@8fa042( 2655): applyTransactionOnDraw applyImmediately
I/VRI[AudioServiceActivity]@8fa042( 2655): dispatchDetachedFromWindow
D/InputTransport( 2655): Input channel destroyed: '5cf0254', fd=153
D/ActivityThread( 2655): com.ryanheise.audioserviceexample will use render engine as VK
I/Adreno-UNKNOWN( 2655): Using previously loaded IMapper library.
D/SurfaceView( 2655): 29088941 setAlpha: alpha=0.0
D/SurfaceView( 2655): 29088941 updateSurface: has no frame
I/Adreno-UNKNOWN( 2655): Using previously loaded IMapper library.
I/AdrenoVK-0( 2655): QUALCOMM build : d3c617e069, I657d20f80b
I/AdrenoVK-0( 2655): Build Date : 04/04/25
I/AdrenoVK-0( 2655): Shader Compiler Version : E031.47.18.28
I/AdrenoVK-0( 2655): Local Branch :
I/AdrenoVK-0( 2655): Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.VENDOR.15.4.0.11.00.00.1088.627
I/AdrenoVK-0( 2655): Remote Branch : NONE
I/AdrenoVK-0( 2655): Reconstruct Branch : NOTHING
I/AdrenoVK-0( 2655): Build Config : S P 18.0.0 AArch64
I/AdrenoVK-0( 2655): Driver Path : /vendor/lib64/hw/vulkan.adreno.so
I/AdrenoVK-0( 2655): Driver Version : 0800.35
I/AdrenoVK-0( 2655): PFP : 0x01500464
I/AdrenoVK-0( 2655): ME : 0x01500012
I/AdrenoVK-0( 2655): Application Name : android framework
I/AdrenoVK-0( 2655): Application Version : 0x00000000
I/AdrenoVK-0( 2655): Engine Name : android framework
I/AdrenoVK-0( 2655): Engine Version : 0x00000000
I/AdrenoVK-0( 2655): Api Version : 0x00401000
I/DecorView( 2655): setWindowBackground: isPopOver=false color=ffffffff d=android.graphics.drawable.ColorDrawable@bc5053a
I/ViewRootImpl( 2655): dVRR is disabled
D/NativeCustomFrequencyManager( 2655): [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
D/InputTransport( 2655): Input channel constructed: '83524d9', fd=153
I/InsetsController( 2655): onStateChanged: host=com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity, from=android.view.ViewRootImpl.setView:1996, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2340), mDisplayCutout=DisplayCutout{insets=Rect(0, 85 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(514, 0 - 566, 85), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2340 physicalDisplayWidth=1080 physicalDisplayHeight=2340 density={2.8125} cutoutSpec={M 0,0 H -9.333333333333333 V 30.13333333333333 H 9.333333333333333 V 0 H 0 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}} sideOverrides={}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=42, center=Point(42, 42)}, RoundedCorner{position=TopRight, radius=42, center=Point(1038, 42)}, RoundedCorner{position=BottomRight, radius=42, center=Point(1038, 2298)}, RoundedCorner{position=BottomLeft, radius=42, center=Point(42, 2298)}]} mRoundedCornerFrame=Rect(0, 0 - 1080, 2340), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(956, 0 - 1080, 85) rotation=0}, mDisplayShape=DisplayShape{ spec=-311912193 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {86fe0001 mType=navigationBars mFrame=[0,2298][1080,2340] mVisible=true mFlags=SUPPRESS_SCRIM mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {86fe0004 mType=systemGestures mFrame=[0,0][84,2340] mVisible=true mFlags= mSideHint=LEFT mBoundingRects=null}, InsetsSource: {86fe0005 mType=mandatorySystemGestures mFrame=[0,2205][1080,2340] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {86fe0006 mType=tappableElement mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {86fe0024 mType=systemGestures mFrame=[996,0][1080,2340] mVisible=true mFlags= mSideHint=RIGHT mBoundingRects=null}, InsetsSource: {99e90000 mType=statusBars mFrame=[0,0][1080,85] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {99e90005 mType=mandatorySystemGestures mFrame=[0,0][1080,119] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {99e90006 mType=tappableElement mFrame=[0,0][1080,85] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {27 mType=displayCutout mFrame=[0,0][1080,85] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null} }
I/VRI[AudioServiceActivity]@67971e1( 2655): synced displayState. AttachInfo displayState=2
I/VRI[AudioServiceActivity]@67971e1( 2655): setView = com.android.internal.policy.DecorView@55fe7f4 IsHRR=false TM=true
D/HWUI ( 2655): HWUI - treat SMPTE_170M as sRGB
I/SurfaceView@1bbdcad( 2655): onWindowVisibilityChanged(0) true io.flutter.embedding.android.FlutterSurfaceView{1bbdcad V.E...... ......I. 0,0-0,0} of VRI[AudioServiceActivity]@67971e1
D/SurfaceView( 2655): 29088941 updateSurface: has no frame
I/BufferQueueProducer( 2655): [](id:a5f00000005,api:0,p:-1,c:2655) setDequeueTimeout:2077252342
I/BLASTBufferQueue_Java( 2655): new BLASTBufferQueue, mName= VRI[AudioServiceActivity]@67971e1 mNativeObject= 0xb4000075afc40d70 sc.mNativeObject= 0xb4000074cfbf9e90 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3390 android.view.ViewRootImpl.relayoutWindow:11355 android.view.ViewRootImpl.performTraversals:4537 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12533 android.view.Choreographer$CallbackRecord.run:1751 android.view.Choreographer$CallbackRecord.run:1760 android.view.Choreographer.doCallbacks:1216 android.view.Choreographer.doFrame:1142 android.view.Choreographer$FrameDisplayEventReceiver.run:1707
I/BLASTBufferQueue_Java( 2655): update, w= 1080 h= 2340 mName = VRI[AudioServiceActivity]@67971e1 mNativeObject= 0xb4000075afc40d70 sc.mNativeObject= 0xb4000074cfbf9e90 format= -3 caller= android.graphics.BLASTBufferQueue.<init>:88 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3390 android.view.ViewRootImpl.relayoutWindow:11355 android.view.ViewRootImpl.performTraversals:4537 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12533
W/libc ( 2655): Access denied finding property "vendor.gpp.create_frc_extension"
I/VRI[AudioServiceActivity]@67971e1( 2655): Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)0 dur=2 res=0x3 s={true 0xb40000752fc7e300} ch=true seqId=0
I/VRI[AudioServiceActivity]@67971e1( 2655): performConfigurationChange setNightDimText nightDimLevel=0
D/VRI[AudioServiceActivity]@67971e1( 2655): mThreadedRenderer.initialize() mSurface={isValid=true 0xb40000752fc7e300} hwInitialized=true
D/SurfaceView( 2655): 29088941 updateSurface: has no frame
I/SurfaceView@1bbdcad( 2655): windowStopped(false) true io.flutter.embedding.android.FlutterSurfaceView{1bbdcad V.E...... ......ID 0,0-1080,2340} of VRI[AudioServiceActivity]@67971e1
D/SurfaceView( 2655): 29088941 updateSurface: has no frame
D/VRI[AudioServiceActivity]@67971e1( 2655): reportNextDraw android.view.ViewRootImpl.performTraversals:5186 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12533 android.view.Choreographer$CallbackRecord.run:1751 android.view.Choreographer$CallbackRecord.run:1760
I/SurfaceView( 2655): 29088941 Changes: creating=true format=true size=true visible=true alpha=true hint=false visible=true left=true top=true z=false attached=true lifecycleStrategy=false
I/BufferQueueProducer( 2655): [](id:a5f00000006,api:0,p:0,c:2655) setDequeueTimeout:2077252342
I/BLASTBufferQueue_Java( 2655): update, w= 1080 h= 2340 mName = null mNativeObject= 0xb4000075afc76f10 sc.mNativeObject= 0xb4000074cfc17f50 format= 4 caller= android.view.SurfaceView.createBlastSurfaceControls:1642 android.view.SurfaceView.updateSurface:1318 android.view.SurfaceView.lambda$new$0:268 android.view.SurfaceView.$r8$lambda$NfZyM_TG8F8lqzaOVZ7noREFjzU:0 android.view.SurfaceView$$ExternalSyntheticLambda1.onPreDraw:0 android.view.ViewTreeObserver.dispatchOnPreDraw:1226
I/SurfaceView( 2655): 29088941 Cur surface: Surface(name=null mNativeObject=0)/@0xb357c19
I/SurfaceView@1bbdcad( 2655): pST: sr = Rect(0, 0 - 1080, 2340) sw = 1080 sh = 2340
D/SurfaceView( 2655): 29088941 performSurfaceTransaction RenderWorker position = [0, 0, 1080, 2340] surfaceSize = 1080x2340
W/libc ( 2655): Access denied finding property "vendor.gpp.create_frc_extension"
I/SurfaceView@1bbdcad( 2655): updateSurface: mVisible = true mSurface.isValid() = true
I/SurfaceView@1bbdcad( 2655): updateSurface: mSurfaceCreated = false surfaceChanged = true visibleChanged = true
I/SurfaceView( 2655): 29088941 visibleChanged -- surfaceCreated
I/SurfaceView@1bbdcad( 2655): surfaceCreated 1 #8 io.flutter.embedding.android.FlutterSurfaceView{1bbdcad V.E...... ......ID 0,0-1080,2340}
I/SurfaceView( 2655): 29088941 surfaceChanged -- format=4 w=1080 h=2340
I/SurfaceView@1bbdcad( 2655): surfaceChanged (1080,2340) 1 #8 io.flutter.embedding.android.FlutterSurfaceView{1bbdcad V.E...... ......ID 0,0-1080,2340}
I/SurfaceView( 2655): 29088941 surfaceRedrawNeeded
I/SurfaceView( 2655): 29088941 finishedDrawing
V/SurfaceView( 2655): Layout: x=0 y=0 w=1080 h=2340, frame=Rect(0, 0 - 1080, 2340)
D/VRI[AudioServiceActivity]@67971e1( 2655): Canceling draw. cancelDueToPreDrawListener=true cancelDueToSync=false
I/InsetsSourceConsumer( 2655): applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity
I/InsetsSourceConsumer( 2655): applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity
I/BLASTBufferQueue_Java( 2655): update, w= 1080 h= 2340 mName = VRI[AudioServiceActivity]@67971e1 mNativeObject= 0xb4000075afc40d70 sc.mNativeObject= 0xb4000074cfbfd610 format= -3 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3379 android.view.ViewRootImpl.relayoutWindow:11355 android.view.ViewRootImpl.performTraversals:4537 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12533 android.view.Choreographer$CallbackRecord.run:1751
I/VRI[AudioServiceActivity]@67971e1( 2655): Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)0 dur=1 res=0x1 s={true 0xb40000752fc7e300} ch=false seqId=0
I/VRI[AudioServiceActivity]@67971e1( 2655): updateBoundsLayer: t=android.view.SurfaceControl$Transaction@32c418c sc=Surface(name=Bounds for - com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity@0)/@0x418c0d5 frame=1
D/VRI[AudioServiceActivity]@67971e1( 2655): reportNextDraw android.view.ViewRootImpl.performTraversals:5186 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12533 android.view.Choreographer$CallbackRecord.run:1751 android.view.Choreographer$CallbackRecord.run:1760
I/BLASTBufferQueue( 2655): [SurfaceView[com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity]@0#3](f:0,a:0,s:0) onFrameAvailable the first frame is available
I/SurfaceComposerClient( 2655): apply transaction with the first frame. layerId: 269018, bufferData(ID: 11403138170916, frameNumber: 1)
D/SurfaceView( 2655): 29088941 setAlpha: alpha=1.0
I/SurfaceView( 2655): 29088941 Changes: creating=false format=false size=false visible=false alpha=true hint=false visible=false left=false top=false z=false attached=true lifecycleStrategy=false
I/SurfaceView( 2655): 29088941 Cur surface: Surface(name=null mNativeObject=-5476376643569886256)/@0xb357c19
I/SurfaceView@1bbdcad( 2655): updateSurface: mVisible = true mSurface.isValid() = true
I/SurfaceView@1bbdcad( 2655): updateSurface: mSurfaceCreated = true surfaceChanged = false visibleChanged = false
I/SurfaceView( 2655): 29088941 surfaceRedrawNeeded
I/SurfaceView( 2655): 29088941 finishedDrawing
V/SurfaceView( 2655): Layout: x=0 y=0 w=1080 h=2340, frame=Rect(0, 0 - 1080, 2340)
D/VRI[AudioServiceActivity]@67971e1( 2655): Setup new sync=wmsSync-VRI[AudioServiceActivity]@67971e1#6
I/VRI[AudioServiceActivity]@67971e1( 2655): Creating new active sync group VRI[AudioServiceActivity]@67971e1#7
D/VRI[AudioServiceActivity]@67971e1( 2655): Draw frame after cancel
D/VRI[AudioServiceActivity]@67971e1( 2655): registerCallbacksForSync syncBuffer=false
W/libc ( 2655): Access denied finding property "vendor.gpp.create_frc_extension"
D/NativeCustomFrequencyManager( 2655): [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
W/libc ( 2655): Access denied finding property "vendor.gpp.create_frc_extension"
D/HWUI ( 2655): CFMS:: SetUp Pid : 2655 Tid : 2681
D/SurfaceView( 2655): 29088941 updateSurfacePosition RenderWorker, frameNr = 1, position = [0, 0, 1080, 2340] surfaceSize = 1080x2340
I/SurfaceView@1bbdcad( 2655): uSP: rtp = Rect(0, 0 - 1080, 2340) rtsw = 1080 rtsh = 2340
I/SurfaceView@1bbdcad( 2655): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1bbdcad( 2655): aOrMT: VRI[AudioServiceActivity]@67971e1 t = android.view.SurfaceControl$Transaction@eb19551 fN = 1 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1792 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:398
I/VRI[AudioServiceActivity]@67971e1( 2655): mWNT: t=0xb4000075cfc3e610 mBlastBufferQueue=0xb4000075afc40d70 fn= 1 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1723 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1792
D/VRI[AudioServiceActivity]@67971e1( 2655): Received frameDrawingCallback syncResult=0 frameNum=1.
I/VRI[AudioServiceActivity]@67971e1( 2655): mWNT: t=0xb4000075cfc59f10 mBlastBufferQueue=0xb4000075afc40d70 fn= 1 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$11.onFrameDraw:15025 android.view.ThreadedRenderer$1.onFrameDraw:761 <bottom of call stack>
I/VRI[AudioServiceActivity]@67971e1( 2655): Setting up sync and frameCommitCallback
I/BLASTBufferQueue( 2655): [VRI[AudioServiceActivity]@67971e1#2](f:0,a:0,s:0) onFrameAvailable the first frame is available
I/SurfaceComposerClient( 2655): apply transaction with the first frame. layerId: 269013, bufferData(ID: 11403138170922, frameNumber: 1)
I/VRI[AudioServiceActivity]@67971e1( 2655): Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
D/HWUI ( 2655): CFMS:: SetUp Pid : 2655 Tid : 2681
D/VRI[AudioServiceActivity]@67971e1( 2655): reportDrawFinished seqId=0
D/VRI[AudioServiceActivity]@67971e1( 2655): mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb40000752fc7e300}
D/InputMethodManagerUtils( 2655): startInputInner - Id : 0
I/InputMethodManager( 2655): startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
D/InputTransport( 2655): Input channel constructed: 'ClientS', fd=274
I/InsetsSourceConsumer( 2655): applyRequestedVisibilityToControl: visible=false, type=ime, host=com.ryanheise.audioserviceexample/com.ryanheise.audioservice.AudioServiceActivity
I/VRI[AudioServiceActivity]@67971e1( 2655): handleResized, frames=ClientWindowFrames{frame=[0,0][1080,2340] display=[0,0][1080,2340] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false dragResizingChanged=false
Application finished.
Exited (-1).
Flutter Doctor output
Flutter doctor
[√] Flutter (Channel stable, 3.32.8, on Microsoft Windows [Version 10.0.19045.6093], locale en-GB) [423ms]
• Flutter version 3.32.8 on channel stable at C:\Flutter\flutter_windows_3.32.0-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision edada7c56e (11 days ago), 2025-07-25 14:08:03 +0000
• Engine revision ef0cd00091
• Dart version 3.8.1
• DevTools version 2.45.1
[√] Windows Version (10 Pro 64-bit, 22H2, 2009) [904ms]
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [13.5s]
• Android SDK at C:\Users\<user>\AppData\Local\Android\sdk
• Platform android-36, build-tools 36.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
• All Android licenses accepted.
[√] Chrome - develop for the web [101ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.6) [100ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.13.35931.197
• Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2025.1.1) [21ms]
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
[√] VS Code (version 1.102.3) [19ms]
• VS Code at C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.116.0
[√] Connected device (3 available) [193ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.6093]
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.184
• Edge (web) • edge • web-javascript • Microsoft Edge 138.0.3351.95
[√] Network resources [11.1s]
• All expected network resources are available.
• No issues found!
</details>