Top Ad unit 728 × 90

Google may let users manage Android’s hidden Recycle Bin in Android 12

Google I/O 2021 kicks off on May 18th next month, and at the event, we’re expecting to see Google announce all the features coming to Android 12. Before the event starts, we’ve been collecting as much information as we can on the latest OS release from the two publicly available Developer Previews. The other day, we also got our hands on an unreleased build of Android 12 and showcased many of the smaller functional and design changes we could find. After digging through the framework and system apps, we’ve spotted code that suggests Google may surface Android’s hidden Recycle Bin/Trash feature in Storage settings.

An APK teardown can often predict features that may arrive in a future update of an application, but it is possible that any of the features we mention here may not make it in a future release. This is because these features are currently unimplemented in the live build and may be pulled at any time by the developers in a future build.

Last year, Google rolled out Android 11 which enforced major changes to the way that apps can access a device’s storage. These changes, which Google calls “Scoped Storage”, significantly limit the amount of storage access an app can get by default. While certain apps like files managers can request broad access to a device’s storage, other apps have to use alternative APIs to add, open, edit, or delete files on the storage. One of these APIs is called the MediaStore API, and it provides access to common media files like audio, videos, and images. MediaStore has actually been around for a while now, but Google added a new feature to the API with the Android 11 release: trashing.

Apps using the MediaStore API can trash rather than delete a file to give users a chance to restore the file later. Most desktop operating systems have a similar feature, but Android 11 itself doesn’t provide a system-wide “Recycle Bin” or “Trash” folder that lists all of the files that have been trashed. Instead, apps with edit access to trashed files or that request user consent can show items from the hidden recycle bin, and we’ve spotted evidence that Google’s own Files by Google app is preparing to add such a feature.

Files by Google Trash Folder 2 Files by Google Trash Folder 2

The hidden Trash folder in the Files by Google app.

With Android 12, however, it looks like Google is working to add a new entry to Settings > Storage to show how much storage space all trashed items take up. Tapping this entry will launch a fragment that shows the number of files that have been trashed and also lets the user empty the trash, but the entry point is normally inaccessible since Google hardcoded it to false. However, thanks to a bit of effort and help from XDA’s Zachary Wander, we managed to get the entry point and dialog to appear.

Although users can empty the trash from here, we don’t know if users will also be able to restore them through this entry point. The upcoming Trash feature in Files by Google will let users view, restore, or permanently delete trashed items, though. We wouldn’t be surprised if Google plans to roll out the new feature in Files by Google at the same time as Android 12’s release, though technically Files by Google’s Trash feature doesn’t actually require Android 12 to be installed.

Trashed items on Android are currently hidden from most file managers as they’re prefaced with a ‘.’ in their filename, which is how Android understands a file should be considered hidden. These hidden trashed files are stored in the same directory where they were originally located rather than being moved to a system-wide Recycle Bin/Trash folder. Based on what we know, it doesn’t look like Google plans to add an actual Recycle Bin/Trash folder in Android 12, but it does look like Google plans to at least make the Trash a more prominent feature. The one issue is that apps have to use the MediaStore API to mark files as “trashed”, so some apps will continue to permanently delete files or utilize their own recycle bin, preventing users from viewing and restoring them in one easily accessible location.

Thanks to PNF Software for providing us a license to use JEB Decompiler, a professional-grade reverse engineering tool for Android applications.

The post Google may let users manage Android’s hidden Recycle Bin in Android 12 appeared first on xda-developers.



from xda-developers https://ift.tt/3ak5gJX
via IFTTT
Google may let users manage Android’s hidden Recycle Bin in Android 12 Reviewed by site on 12:55 Rating: 5

No comments:

All Rights Reserved by xda-developers © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Formulaire de contact

Name

Email *

Message *

Powered by Blogger.