Google non permette ai produttori di nascondere l'utilizzo della batteria in Marshmallow

Lorenzo Quiroli
Lorenzo Quiroli
Google non permette ai produttori di nascondere l'utilizzo della batteria in Marshmallow

Torniamo a parlare delle nuove regole contenute nel CDD (Compatibility Definition Document) di Android 6.0 Marshmallow, che dedica un po' di spazio anche alla schermata nella quale sono presenti le informazioni sul consumo di batteria.

LEGGI ANCHE: Le nuove regole di Google per lettore di impronte, crittografia, audio professionale e permessi

Ecco il paragrafo che fa riferimento proprio al famoso grafico:

8.4. Power Consumption Accounting
A more accurate accounting and reporting of the power consumption provides the app developer both the incentives and the tools to optimize the power usage pattern of the application.

  • Therefore, device implementations MUST be able to track hardware component power usage and attribute that power usage to specific applications. Specifically, implementations:
    • MUST provide a per-component power profile that defines the current consumption value for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site [Resources, 123].
    • MUST report all power consumption values in milliampere hours (mAh)
    • SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
    • MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the uid_cputime kernel module implementation.
  • MUST make this power usage available via the adb shell dumpsys batterystats shell command to the app developer [Resources, 124].
  • MUST honor the android.intent.action.POWER_USAGE_SUMMARY intent and display a settings menu that shows this power usage [Resources, 125].

Insomma, è anche possibile che in Lollipop i produttori nascondano dal grafico del consumo della batteria alcune delle loro app, ma non potranno più fare ciò in Marshmallow. Inoltre avremo una maggiore consistenza nelle informazioni mostrate tra diversi dispositivi, in modo da poterli paragonare con più facilità.

Fonte: AndroidPolice