Skip to content

AccessibilityFeatures.disableAnimations flag is not set on app startup and animations are not disabled in app running on Android 12+ device. #130976

Closed

Description

@sanderpensa

Is there an existing issue for this?

Steps to reproduce

  1. On Android 12+ device disable animations from Settings > Accessibility > Remove animations.
  2. Run the app flutter run --release (does not matter if in release, profile or debug mode, we have this bug in live app also).
  3. Observe AccessibilityFeatures.disableAnimations flag is not set, animations are not removed.
  4. Put the app to backgound (do not close it), and change the "Remove animations" setting off and on again from Settings > Accessibility > Remove animations.
  5. Open app from recents, observe AccessibilityFeatures.disableAnimations flag is updated and set after few seconds and animations are disabled.

Expected results

App animations are disabled on Android 12+.

Actual results

Animations are not disabled.

Code sample

Code sample
import 'dart:ui';

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Accessibility disableAnimations example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const SlideAnimationDemo(),
    );
  }
}

class SlideAnimationDemo extends StatefulWidget {
  const SlideAnimationDemo({super.key});

  @override
  State<SlideAnimationDemo> createState() => _SlideAnimationDemoState();
}

class _SlideAnimationDemoState extends State<SlideAnimationDemo>
    with SingleTickerProviderStateMixin, WidgetsBindingObserver {
  late AnimationController _animationController;
  late Animation<Offset> _slideAnimation;
  String features = '';

  @override
  void initState() {
    super.initState();

    WidgetsBinding.instance.addObserver(this);

    _animationController = AnimationController(
      vsync: this,
      duration: const Duration(milliseconds: 1000),
    );

    _slideAnimation = Tween<Offset>(
      begin: const Offset(-1.0, 0.0),
      end: Offset.zero,
    ).animate(CurvedAnimation(
      parent: _animationController,
      curve: Curves.easeInOut,
    ));

    features = PlatformDispatcher.instance.accessibilityFeatures.toString();
  }

  @override
  void dispose() {
    _animationController.dispose();
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }

  void _playAnimation() {
    if (_animationController.status == AnimationStatus.completed) {
      _animationController.reverse();
    } else {
      _animationController.forward();
    }
  }

  @override
  void didChangeAccessibilityFeatures() {
    final newFeatures =
        PlatformDispatcher.instance.accessibilityFeatures.toString();
    debugPrint("didChangeAccessibilityFeatures $newFeatures");
    setState(() {
      features = newFeatures;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Slide animation demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const SizedBox(height: 20),
            Text(features),
            const SizedBox(height: 20),
            SlideTransition(
              position: _slideAnimation,
              child: Container(
                width: 100,
                height: 100,
                color: Colors.red,
              ),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: _playAnimation,
              child: const Text('Animate'),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version 10.0.19044.3086], locale et-EE)
    • Flutter version 3.10.6 on channel stable at C:\Users\sande\fvm\versions\3.10.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (8 days ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\Users\sande\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = C:\Users\sande\AppData\Local\Android\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java      
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe     

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)   
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community  
    • Visual Studio Community 2022 version 17.2.32526.322
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.2)
    • 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 17.0.6+0-b2043.56-9586694)

[√] IntelliJ IDEA Community Edition (version 2019.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.1
    • 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

[√] IntelliJ IDEA Community Edition (version 2022.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1.1
    • 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

[√] VS Code, 64-bit edition (version 1.80.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.68.0

[√] Connected device (4 available)
    • Pixel 3 XL (mobile) • 8ABY0HG2L • android-arm64  • Android 12 (API 31)
    • Windows (desktop)   • windows   • windows-x64    • Microsoft Windows [Version 10.0.19044.3086]
    • Chrome (web)        • chrome    • web-javascript • Google Chrome 114.0.5735.199
    • Edge (web)          • edge      • web-javascript • Microsoft Edge 114.0.1823.55

[√] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. danagbemava-nc commented on Jul 20, 2023

    @danagbemava-nc
    Member

    Issue is reproducible using the code sample and steps outlined above.
    I tested on a Pixel 7 running android 13 and a Nokia 6 running android 9.

    On the Pixel 7, the bug reproduced as expected on both stable and master.
    However, on the Nokia 6, everything worked just fine.

    flutter doctor -v
    [!] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
        • Flutter version 3.10.6 on channel stable at /Users/nexus/dev/sdks/flutter
        ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutters/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutters/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision f468f3366c (8 days ago), 2023-07-12 15:19:05 -0700
        • Engine revision cdbeda788a
        • Dart version 3.0.6
        • DevTools version 2.23.1
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
        • 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 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
        • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
        • Flutter plugin version 74.0.4
        • Dart plugin version 231.9161.14
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
        • 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
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
        • 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
    
    [✓] VS Code (version 1.80.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.68.0
    
    [✓] Connected device (4 available)
        • Pixel 7 (mobile) • 28291FDH2001SA   • android-arm64  • Android 13 (API 33)
        • TA 1021 (mobile) • PLEGAR1790423460 • android-arm64  • Android 9 (API 28)
        • macOS (desktop)  • macos            • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
        • Chrome (web)     • chrome           • web-javascript • Google Chrome 114.0.5735.198
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
    [✓] Flutter (Channel master, 3.13.0-7.0.pre.33, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
        • Flutter version 3.13.0-7.0.pre.33 on channel master at /Users/nexus/dev/sdks/flutters
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 4cd9fd00c0 (6 hours ago), 2023-07-20 03:35:00 -0400
        • Engine revision b494143fb0
        • Dart version 3.1.0 (build 3.1.0-330.0.dev)
        • DevTools version 2.25.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
        • 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 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
        • 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
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
        • 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
    
    [✓] VS Code (version 1.80.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.68.0
    
    [✓] Connected device (4 available)
        • Pixel 7 (mobile) • 28291FDH2001SA   • android-arm64  • Android 13 (API 33)
        • TA 1021 (mobile) • PLEGAR1790423460 • android-arm64  • Android 9 (API 28)
        • macOS (desktop)  • macos            • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
        • Chrome (web)     • chrome           • web-javascript • Google Chrome 114.0.5735.198
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
  2. added
    platform-androidAndroid applications specifically
    engineflutter/engine related. See also e: labels.
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    e: OS-version specificAffects only some versions of the relevant operating system
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-androidOwned by Android platform team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 20, 2023
  3. sanderpensa commented on Jul 25, 2023

    @sanderpensa
    Author

    I can confirm that on android 9 (Sony xz1 compact) it works as expected.
    On Pixel 3XL (android 12), Pixel 5 (android 13) and Poco f4 (android 13) the issue is present.

  4. gmackall commented on Jul 27, 2023

    @gmackall
    Member

    note from android triage: @reidbaker to investigate further (determine if this is a regression or not).

  5. added
    P2Important issues not at the top of the work list
    triaged-androidTriaged by Android platform team
    on Jul 27, 2023
  6. 2 remaining items

  7. exscape commented on Jun 13, 2024

    @exscape

    Could someone please take a look at this? If the fix is really as simple as the above comments suggests, the fix itself is a 2-minute job; it's a shame for such a bug to cause issues for so many people for a year if not longer.
    This flutter bug prevents me from using an app written in Flutter (though I would expect the same is true for MANY flutter apps, only I haven't used them yet).

  8. hakonber commented on Jun 17, 2024

    @hakonber
    Contributor

    I have submitted a PR, mostly based on horsemankukka's comment above.

    flutter-team-archive/engine#53428

    It's my first Flutter PR, so I'm not sure how to request a review, but hopefully someone here can pass it on the right person(s).

  9. added a commit that references this issue on Nov 13, 2025
  10. justinmc commented on Nov 18, 2025

    @justinmc
    Contributor

    I think this issue can be closed now that flutter-team-archive/engine#53428 has merged to pass this through to MediaQuery, and #176492 has made Image respect that setting. If there's still work to do here let me know and I'll reopen!

  11. added a commit that references this issue on Nov 22, 2025
  12. added a commit that references this issue on Dec 2, 2025
  13. github-actions commented on Dec 3, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)e: OS-version specificAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10found in release: 3.13Found to occur in 3.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions