LightBlog

lundi 23 octobre 2017

The Google Pixel 2’s Dark Theme Can’t be Manually Enabled via ADB

When the Google Pixel 2 and the Pixel 2 XL were announced, hands-on reviewers noted that it had a new feature: a partial dark theme that tints the new Pixel Launcher’s app drawer, the system notification tray (excluding notifications themselves), quick settings, volume indicators, and the revamped power menu.

The dark theme is activated when users pick a wallpaper that is primarily dark in the Google Wallpapers app (a port of the Wallpapers app is available here).

As a reminder, users prefer to use dark themes on OLED devices because of OLED’s inherent characteristics. The power draw of an OLED screen is dependent on the Average Picture Level (APL) of content displayed, which means that content with a white background will draw up the most amount of power compared to content which has a black background. This is because blacks in OLED are truly switched off pixels, unlike LCD technology in which a backlight is needed all the time.

Dark themes have been a popular feature in custom ROMs and OEM skins, but Google didn’t adapt the feature until the partial implementation on the Pixel 2.

As a follow-up to this article, we investigated to see if this dark theme can be enabled regardless of the choice of the wallpaper. If it could have been enabled manually, users would have been able to benefit from it without having to commit to a primarily dark wallpaper. Instead, users could have used any wallpaper or live wallpaper of their choice.

Unfortunately, it appears that the dark theme can’t be enabled manually via ADB. We had already known that the dark theme on the Pixel 2 is a theme built on the OverlayManagerService (OMS) theme framework (which was added in Oreo), the same thing that Substratum is based on.

We used the following command to enable the theme:

cmd overlay enable com.android.systemui.theme.dark

The problem is that it doesn’t take effect immediately because SystemUI needs to restart before the theme will apply. The only way to restart SystemUI in Android without root is to reboot the device.

Google Pixel 2 Dark Theme Before Reboot

Pixel 2’s Dark Theme Enabled Manually via ADB

Unfortunately, rebooting the device caused the theme to automatically reset, and we aren’t sure why.

Google Pixel 2 Dark Theme after Reboot

Pixel 2’s Dark Theme Disabled Automatically after Reboot

Therefore, the only way to get a full dark theme on the Google Pixel 2 and Pixel 2 XL—if you want to use whatever wallpaper you want—is to follow our guide using Substratum and its Andromeda add-on.


Thanks to Eli Irvin for testing this for us!



from xda-developers http://ift.tt/2xi4aZE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire