55

Google is working on lock screen clock customization in Android Q

 5 years ago
source link: https://www.tuicool.com/articles/hit/viAZFnf
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The first Android Q beta release was made public 2 days ago. If you have aGoogle Pixel smartphone, you can download the beta right now. The biggest new features in Q are the system-widedark mode (which has inexplicably beenhidden from users), the privacy and permissions revamp (though the leaked permission overview interface was also hidden), and thedesktop mode. We’ve been digging into the release using our trustedAPKTool and JEB Decompiler to find all the hidden features likenew gestures and Active Edge remapping that might arrive in thefinal Q release. Another feature that we found is lock screen clock customization.

As shown below, Google is working on letting you customize the appearance of the clock on the lock screen. They’ve created 3 different custom clock presets that can be enabled right now with by changing the value of a hidden setting. The preset clocks include a text clock, a bubble clock, and a stretch analog clock. All of these custom clocks are incomplete since they’re missing the date and weather, but they do work with the Always on Display of thePixel 2 andPixel 3. The bubble and stretch clocks also show the standard digital clock, which probably won’t happen if this feature makes its way into the final Android Q release.

uEVVja7.jpg!web Stock lock screen clock UfqyQjq.jpg!web Text lock screen clock F3mYRjF.jpg!web Bubble lock screen clock R3IvQ3B.jpg!web Stretch lock screen clock

To enable these custom clocks on Android Q, follow the instructions below.

Requirements:

  • Google Pixel,Pixel XL, Pixel 2,Pixel 2 XL, Pixel 3, orPixel 3 XL running the Android Q beta
  • Android Debug Bridge (ADB) set up on your Windows, Linux, or macOS PC. Instructions can befound here.

Run one of the following commands to change the lock screen clock. The command takes effect immediately:

Bubble Clock: 

adb shell settings put secure lock_screen_custom_clock_face "com.android.keyguard.clock.BubbleClockController"

Stretch Analog Clock:

adb shell settings put secure lock_screen_custom_clock_face "com.android.keyguard.clock.StretchAnalogClockController"

Text Clock: 

adb shell settings put secure lock_screen_custom_clock_face "com.android.keyguard.clock.TypeClockController"

Normal Clock:

adb shell settings delete secure lock_screen_custom_clock_face

For any interested developers, here’s the relevant method in SystemUIGoogle’s ClockManager class:

Code for custom clock faces on the lock screen

private void register() {
String str = "lock_screen_custom_clock_face";
this.mContentResolver.registerContentObserver(Secure.getUriFor(str), false, this.mContentObserver);
ExtensionBuilder newExtension = this.mExtensionController.newExtension(ClockPlugin.class);
newExtension.withPlugin(ClockPlugin.class);
newExtension.withCallback(this.mClockPluginConsumer);
newExtension.withDefault(new SettingsGattedSupplier(this.mContentResolver, str, BubbleClockController.class.getName(), new C0386-$$Lambda$ClockManager$LL3RUa19AVegk9Mkg8eS_BmuG7o(this)));
newExtension.withDefault(new SettingsGattedSupplier(this.mContentResolver, str, StretchAnalogClockController.class.getName(), new C0387-$$Lambda$ClockManager$aVyrwGQVcB_VpjAEn9xTWGKpSj8(this)));
newExtension.withDefault(new SettingsGattedSupplier(this.mContentResolver, str, TypeClockController.class.getName(), new C0384-$$Lambda$ClockManager$0RLVFJyrdkzcA8PsTIu0AOgpy1E(this)));
this.mClockExtension = newExtension.build();
}

These custom clocks are being developed as a plug-in to SystemUI. It’s possible we might see them in the SystemUI Tuner of a future Android Q release, or we may never see them at all in any user-accessible way. Google works on new features like this all the time, many of which sadly never make their way into the Settings app. One of the most notable examples of this is the hidden navigation bar tuner in Android 7 Nougat. If lock screen clock customization does get released in a future Android Q beta build, we’ll let you all know.

More Android Q News, Tips, and Tricks


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK