summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ben Reich <benreich@google.com> 2024-10-31 14:42:32 +1100
committer Ben Reich <benreich@google.com> 2024-10-31 14:44:12 +1100
commit4b7083c475a02f2d3dbab66f99eb9d99d04a5427 (patch)
tree1104f9785b81c25650ab5f84b3b9b29ab982ff85
parent3bdd0fbfc08550544464b2bb34b6b84993358241 (diff)
Respect is_launcher_enabled on PRE_BOOT_COMPLETED for FEATURE_PC
For devices running version S+ that undergo an update. The value for is_launcher_enabled that is specified in the RRO is not respected. Despite being read it is simply hardcoded to false. This means that devices that have it enabled during development then undergo an update it stays visible for a short period then promptly disappears. For now let's remove this behaviour when the FEATURE_PC system feature is enabled. Bug: 374866808 Test: m dist && update_device.py, verify DocsUI doesn't hide Flag: EXEMPT desktop-only change Change-Id: I776c59dd4421566aab3cf122f2cb3dbed9a45164
-rw-r--r--src/com/android/documentsui/PreBootReceiver.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/documentsui/PreBootReceiver.java b/src/com/android/documentsui/PreBootReceiver.java
index 2bdbee555..afb32dd54 100644
--- a/src/com/android/documentsui/PreBootReceiver.java
+++ b/src/com/android/documentsui/PreBootReceiver.java
@@ -95,8 +95,11 @@ public class PreBootReceiver extends BroadcastReceiver {
if (resId != 0) {
final ComponentName component = new ComponentName(packageName, className);
boolean enabled = overlayRes.getBoolean(resId);
- if (VersionUtils.isAtLeastS() && CONFIG_IS_LAUNCHER_ENABLED.equals(config)) {
- enabled = false; // Do not allow LauncherActivity to be enabled for S+.
+ if (VersionUtils.isAtLeastS() && !pm.hasSystemFeature(PackageManager.FEATURE_PC)
+ && CONFIG_IS_LAUNCHER_ENABLED.equals(config)) {
+ // Devices using S+ that don't support the `FEATURE_PC` system feature should not
+ // show Files in the launcher.
+ enabled = false;
}
if (DEBUG) {
Log.i(TAG,