diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d4e5e0e8670..e65049446df 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -150,10 +150,13 @@
-
+
+
+
+
"Display: %1$s moved down"
"Display: %1$s moved left"
"Display: %1$s moved right"
- "Google Cast"
+ "Cast"
"mirror"
"Enable wireless display"
"No nearby devices were found."
@@ -3775,7 +3775,7 @@
"caret, text caret, text cursor, cursor, blinking, blink interval, blink rate, animation, reduce animation, remove animation"
"Volume and vibration"
"Media volume"
- "Google Cast volume"
+ "Cast volume"
"Call volume"
"Alarm volume"
"Assistant volume"
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index 22b6f74c23f..0fa0efba534 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -973,7 +973,7 @@
"Display: %1$s moved down"
"Display: %1$s moved left"
"Display: %1$s moved right"
- "Google Cast"
+ "Cast"
"mirror"
"Enable wireless display"
"No nearby devices were found."
@@ -3775,7 +3775,7 @@
"caret, text caret, text cursor, cursor, blinking, blink interval, blink rate, animation, reduce animation, remove animation"
"Volume and vibration"
"Media volume"
- "Google Cast volume"
+ "Cast volume"
"Call volume"
"Alarm volume"
"Assistant volume"
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index ffe06a45ad7..3612e93b96b 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -973,7 +973,7 @@
"Display: %1$s moved down"
"Display: %1$s moved left"
"Display: %1$s moved right"
- "Google Cast"
+ "Cast"
"mirror"
"Enable wireless display"
"No nearby devices were found."
@@ -3775,7 +3775,7 @@
"caret, text caret, text cursor, cursor, blinking, blink interval, blink rate, animation, reduce animation, remove animation"
"Volume and vibration"
"Media volume"
- "Google Cast volume"
+ "Cast volume"
"Call volume"
"Alarm volume"
"Assistant volume"
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 28a57a30e88..5ab0ed5d081 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -973,7 +973,7 @@
"Display: %1$s moved down"
"Display: %1$s moved left"
"Display: %1$s moved right"
- "Google Cast"
+ "Cast"
"mirror"
"Enable wireless display"
"No nearby devices were found."
@@ -3775,7 +3775,7 @@
"caret, text caret, text cursor, cursor, blinking, blink interval, blink rate, animation, reduce animation, remove animation"
"Volume and vibration"
"Media volume"
- "Google Cast volume"
+ "Cast volume"
"Call volume"
"Alarm volume"
"Assistant volume"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 55de29a749a..9041d8a83e3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2283,7 +2283,7 @@
Display: %1$s moved right
- Google Cast
+ Cast
mirror
@@ -9040,7 +9040,7 @@
Media volume
- Google Cast volume
+ Cast volume
Call volume
diff --git a/res/values/strings_app_exploit_protection.xml b/res/values/strings_app_exploit_protection.xml
index 59348a1fc82..42111bf22a0 100644
--- a/res/values/strings_app_exploit_protection.xml
+++ b/res/values/strings_app_exploit_protection.xml
@@ -34,7 +34,7 @@ This behavior can be disabled in the %2$s section.
%1$s is enabled
Exploit protection compatibility mode
- Improves compatibility by disabling some of the GrapheneOS exploit protections for this app
+ Improves compatibility by disabling some of the Modern Apps OS exploit protections for this app
Hardened memory allocator
diff --git a/res/values/strings_ext.xml b/res/values/strings_ext.xml
index 18de9b0a68d..2802c605ed4 100644
--- a/res/values/strings_ext.xml
+++ b/res/values/strings_ext.xml
@@ -52,26 +52,6 @@
Off
Will make acquiring location lock significantly slower, especially if PSDS is turned off too
- eSIM support
-
-A device restart is required to enable this setting.
-
- Warning
-
-"Turning off eSIM support will break the following functionality:
-
-• adding new eSIMs
-• turning existing eSIMs on or off
-• removing eSIMs, including from the lock screen (e.g. when eSIM is locked with a forgotten PIN)
-• wiping eSIMs during factory reset
-
-Device will be automatically restarted."
-
- Restart
- Proceed
- Can\'t turn off eSIM
- eSIM support is turned off. Enable eSIM support to disable the eSIM.
-
Attestation key provisioning
GrapheneOS proxy
Google server
@@ -196,7 +176,7 @@ There are HTTP, HTTPS, DNS, DNS-over-TLS and DNS-over-HTTPS connectivity checks.
Duress password
"Duress password can be entered instead of the user password in any place that asks for it, such as the lock screen of any user and any user or work profile password prompt.
-Submitting the duress password will immediately make the storage contents permanently inaccessible, delete all eSIMs and then power off the device. GrapheneOS will remain installed.
+Submitting the duress password will immediately make the storage contents permanently inaccessible, delete all eSIMs and then power off the device. Modern Apps OS will remain installed.
Duress PIN works the same way duress password does."
Enter duress PIN
@@ -226,7 +206,7 @@ Duress PIN works the same way duress password does."
Confirm
Play Integrity API
- The Play Integrity API allows services to verify properties of a device through their app. Most services check for the device or strong integrity level which requires having the unmodified stock OS on a device licensing Google Mobile Services. Not every app using it will ban using GrapheneOS. GrapheneOS passes the basic integrity level and the miscellaneous checks for licensing, Play Protect, etc. work fine. We recommend leaving feedback for apps using it to ban GrapheneOS asking them to stop banning using a much more secure OS. Apps can use the standard Android hardware attestation API to verify the hardware, OS and app with GrapheneOS.
+ The Play Integrity API allows services to verify properties of a device through their app. Most services check for the device or strong integrity level which requires having the unmodified stock OS on a device licensing Google Mobile Services. Not every app using it will ban using Modern Apps OS. Modern Apps OS passes the basic integrity level and the miscellaneous checks for licensing, Play Protect, etc. work fine. We recommend leaving feedback for apps using it to ban Modern Apps OS asking them to stop banning using a much more secure OS. Apps can use the standard Android hardware attestation API to verify the hardware, OS and app with Modern Apps OS.
Contact app developer
Show usage notifications
Block usage attempts
@@ -238,6 +218,13 @@ Duress PIN works the same way duress password does."
Show apps that used the Play Integrity API
Network location
+
+ Network location & geocoding
+
+ Works offline
+
+ Setup required
"Network location is a method of determining your device’s location by using various nearby signals, such as Wi-Fi networks, Bluetooth devices, and cell towers. Your device scans for these signals and sends their identifiers to a server, which then provides positioning data that your device uses to estimate its location. Currently, Wi-Fi networks and cell towers are used.
diff --git a/res/xml/location_services.xml b/res/xml/location_services.xml
index e33f3a5eace..32d14f99642 100644
--- a/res/xml/location_services.xml
+++ b/res/xml/location_services.xml
@@ -37,13 +37,7 @@
-
-
diff --git a/res/xml/network_provider_internet.xml b/res/xml/network_provider_internet.xml
index 0ed7956c448..c62308062f3 100644
--- a/res/xml/network_provider_internet.xml
+++ b/res/xml/network_provider_internet.xml
@@ -56,14 +56,6 @@
settings:useAdminDisabledSummary="true"
settings:controller="com.android.settings.network.MobileNetworkSummaryController" />
-
-
+
+
+
+
+
+
+ cursor.moveToFirst() && cursor.getInt(0) == 1
+ } ?: false
+ } catch (e: Exception) {
+ Log.w(TAG, "could not read $STATUS_URI", e)
+ false
+ }
+
+ private companion object {
+ const val TAG = "LocationServicesNetworkLocation"
+
+ const val PROVIDER_PACKAGE = "com.vayunmathur.networklocation"
+ const val PROVIDER_ACTIVITY = "com.vayunmathur.networklocation.MainActivity"
+
+ /** Mirrors `DatabaseStatusContract` in the networklocation app. */
+ val STATUS_URI: Uri =
+ Uri.parse("content://com.vayunmathur.networklocation.status/databases")
}
}
diff --git a/src/com/android/settings/network/GoogleEuiccLpaController.java b/src/com/android/settings/network/GoogleEuiccLpaController.java
deleted file mode 100644
index d697c3b97f1..00000000000
--- a/src/com/android/settings/network/GoogleEuiccLpaController.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package com.android.settings.network;
-
-import android.Manifest;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.ext.PackageId;
-import android.os.PowerManager;
-import android.os.UserHandle;
-import android.permission.PermissionManager;
-
-import com.android.settings.R;
-import com.android.settings.ext.AbstractTogglePrefController;
-import com.android.settings.ext.ExtSettingControllerHelper;
-
-import static java.util.Objects.requireNonNull;
-
-public class GoogleEuiccLpaController extends AbstractTogglePrefController {
- private static final String PKG_NAME = PackageId.G_EUICC_LPA_NAME;
-
- private final PackageManager packageManager;
- private final boolean isPresent;
-
- public GoogleEuiccLpaController(Context context, String key) {
- super(context, key);
- packageManager = context.getPackageManager();
-
- boolean isPresent = false;
- try {
- var ai = packageManager.getApplicationInfo(PKG_NAME, 0);
- isPresent = ai.isSystemApp();
- } catch (PackageManager.NameNotFoundException ignored) {}
-
- this.isPresent = isPresent;
- }
-
- @Override
- public boolean isChecked() {
- try {
- return isPresent && packageManager.getApplicationInfo(PKG_NAME, 0).enabled;
- } catch (PackageManager.NameNotFoundException e) {
- return false;
- }
- }
-
- @Override
- public int getAvailabilityStatus() {
- if (!isPresent) {
- return UNSUPPORTED_ON_DEVICE;
- }
- return ExtSettingControllerHelper.getGlobalSettingAvailability(mContext);
- }
-
- private void setEnabled(boolean isEnabled) {
- String pkg = PKG_NAME;
-
- if (isEnabled) {
- var permManager = mContext.getSystemService(PermissionManager.class);
- UserHandle user = mContext.getUser();
-
- String perm = Manifest.permission.CAMERA;
- permManager.revokeRuntimePermission(pkg, perm, user, null);
- // Previously, Camera permission was auto-granted with the FLAG_PERMISSION_SYSTEM_FIXED,
- // which made it unchangeable by the user.
- // Removing FLAG_PERMISSION_USER_FIXED is needed to make sure that the app is always
- // able to show a permission request dialog after being enabled
- int permFlagsToRemove = PackageManager.FLAG_PERMISSION_SYSTEM_FIXED
- | PackageManager.FLAG_PERMISSION_USER_FIXED;
- permManager.updatePermissionFlags(pkg, perm, permFlagsToRemove, 0, user);
- }
-
- var powerManager = requireNonNull(mContext.getSystemService(PowerManager.class));
-
- int ces = isEnabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED :
- PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
- packageManager.setApplicationEnabledSetting(pkg, ces, 0);
-
- // Reboot is required in both cases:
- // - OS code doesn't expect LPA to become unavailable at runtime and starts to poll for it
- // with a high frequency
- // - EuiccGoogle performs initialization in response to "(locked) boot completed" broadcasts
- // - also, if current boot count is 1 (i.e. if this is the first boot), EuiccGoogle expects to
- // be interacted with by Google's SetupWizard. Boot count will be at least 2 after reboot.
- powerManager.reboot(null);
- }
-
- @Override
- public boolean setChecked(boolean isChecked) {
- var b = new AlertDialog.Builder(mContext);
-
- int msg;
- int btnText;
- if (isChecked) {
- msg = R.string.g_euicc_lpa_enable_dialog_msg;
- btnText = R.string.g_euicc_lpa_restart_button;
- } else {
- b.setTitle(R.string.g_euicc_lpa_disable_dialog_title);
- msg = R.string.g_euicc_lpa_disable_dialog_msg;
- btnText = R.string.g_euicc_lpa_proceed_button;
- }
-
- b.setMessage(msg);
- b.setPositiveButton(btnText, (d, btn) -> setEnabled(isChecked));
- b.show();
-
- return false;
- }
-}
diff --git a/src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java b/src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java
index 7c70d9165e7..a81b2b4edd8 100644
--- a/src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java
+++ b/src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java
@@ -18,8 +18,6 @@ package com.android.settings.network.telephony;
import android.content.Context;
import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.ext.PackageId;
import android.os.Bundle;
import android.os.UserManager;
import android.telephony.SubscriptionInfo;
@@ -123,14 +121,6 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
== View.LAYOUT_DIRECTION_RTL;
Log.i(TAG, "isMultipleEnabledProfilesSupported():" + isMultipleEnabledProfilesSupported());
- if (shouldDisallowDisablingEsim()) {
- Log.i(TAG, "Cannot disable eSIM while eSIM support is disabled.");
- showErrorDialog(
- getString(R.string.sim_action_esim_support_disabled_title),
- getString(R.string.sim_action_esim_support_disabled_text));
- return;
- }
-
if (savedInstanceState == null) {
if (mEnable) {
showEnableSubDialog();
@@ -608,47 +598,4 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
cardInfo -> cardInfo.isMultipleEnabledProfilesSupported());
}
- private boolean shouldDisallowDisablingEsim() {
- if (mEnable || mSubInfo == null) {
- return false;
- }
- final boolean isActiveSub =
- mSubInfo.getSimSlotIndex() != SubscriptionManager.INVALID_SIM_SLOT_INDEX;
- final boolean isEuiccSub = isEuiccSubscription(mSubInfo);
- final boolean isEsimSupportEnabled = isEsimSupportEnabled();
- Log.d(TAG, "shouldDisallowDisablingEsim: isActive=" + isActiveSub
- + ", isEuiccSub=" + isEuiccSub
- + ", isEmbedded=" + mSubInfo.isEmbedded()
- + ", cardId=" + mSubInfo.getCardId()
- + ", isEsimSupportEnabled=" + isEsimSupportEnabled);
- return isActiveSub && isEuiccSub && !isEsimSupportEnabled;
- }
-
- private boolean isEuiccSubscription(SubscriptionInfo subInfo) {
- /* subInfo doesn't contain accurate eSIM profile info before eUICC LPA is
- * enabled for the first time, but it should be valid afterward.
- */
- if (subInfo.isEmbedded()) {
- return true;
- }
- final int cardId = subInfo.getCardId();
- final List cardsInfo = mTelMgr.getUiccCardsInfo();
- if (cardId > TelephonyManager.UNSUPPORTED_CARD_ID) {
- if (cardsInfo.stream().anyMatch(cardInfo ->
- cardInfo != null && cardInfo.getCardId() == cardId && cardInfo.isEuicc())) {
- return true;
- }
- }
- return false;
- }
-
- private boolean isEsimSupportEnabled() {
- try {
- return getPackageManager()
- .getApplicationInfo(PackageId.G_EUICC_LPA_NAME, PackageManager.MATCH_SYSTEM_ONLY)
- .enabled;
- } catch (PackageManager.NameNotFoundException e) {
- return true;
- }
- }
}
diff --git a/src/com/android/settings/supervision/SupervisionDashboardActivity.kt b/src/com/android/settings/supervision/SupervisionDashboardActivity.kt
index cbc52e60a8a..1b5bd0e884e 100644
--- a/src/com/android/settings/supervision/SupervisionDashboardActivity.kt
+++ b/src/com/android/settings/supervision/SupervisionDashboardActivity.kt
@@ -42,6 +42,19 @@ class SupervisionDashboardActivity :
override fun onResume() {
super.onResume()
+ // MAOS: the AOSP supervision dashboard is replaced by the Modern Apps Parental Controls
+ // app; redirect any entry (search, embedding, direct launch) into it and finish.
+ run {
+ val maosRedirect =
+ Intent("com.vayunmathur.parentalcontrols.action.DASHBOARD")
+ .setPackage("com.vayunmathur.parentalcontrols")
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ if (packageManager.queryIntentActivities(maosRedirect, 0).isNotEmpty()) {
+ startActivity(maosRedirect)
+ finish()
+ return
+ }
+ }
if (!Flags.enableSupervisionSettingsUiUpdates() && shouldRedirectToSupervisionApp()) {
val redirectIntent = getSupervisionAppIntent()
diff --git a/src/com/android/settings/supervision/TopLevelSupervisionPreferenceController.kt b/src/com/android/settings/supervision/TopLevelSupervisionPreferenceController.kt
index c689a201ec0..14b2bbdba72 100644
--- a/src/com/android/settings/supervision/TopLevelSupervisionPreferenceController.kt
+++ b/src/com/android/settings/supervision/TopLevelSupervisionPreferenceController.kt
@@ -44,8 +44,11 @@ class TopLevelSupervisionPreferenceController(context: Context, key: String) :
override fun handlePreferenceTreeClick(preference: Preference): Boolean {
if (preference.key == preferenceKey) {
- val intent = Intent(mContext, SupervisionDashboardActivity::class.java)
- intent.putExtra(EXTRA_IS_SECOND_LAYER_PAGE, true)
+ // MAOS: open the Modern Apps Parental Controls app instead of the AOSP dashboard.
+ val intent =
+ Intent("com.vayunmathur.parentalcontrols.action.DASHBOARD")
+ .setPackage("com.vayunmathur.parentalcontrols")
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
mContext.startActivity(intent)
return true
}
@@ -69,3 +72,34 @@ class TopLevelSupervisionPreferenceController(context: Context, key: String) :
return AVAILABLE
}
}
+
+
+/**
+ * MAOS: top-level "Screen Time" entry that opens the Modern Apps Screen Time app.
+ *
+ * Lives in this tracked file (rather than a new source file) so settings.patch stays a set of
+ * edits to existing files and re-applies cleanly after repo sync. The Screen Time app has no
+ * launcher icon, so this is its entry point; shown only when it answers its dashboard action.
+ */
+class TopLevelScreenTimePreferenceController(context: Context, key: String) :
+ BasePreferenceController(context, key) {
+
+ override fun getAvailabilityStatus(): Int =
+ if (mContext.packageManager.queryIntentActivities(dashboardIntent(), 0).isNotEmpty()) {
+ AVAILABLE
+ } else {
+ UNSUPPORTED_ON_DEVICE
+ }
+
+ override fun handlePreferenceTreeClick(preference: Preference): Boolean {
+ if (preference.key == preferenceKey) {
+ mContext.startActivity(dashboardIntent().addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
+ return true
+ }
+ return super.handlePreferenceTreeClick(preference)
+ }
+
+ private fun dashboardIntent(): Intent =
+ Intent("com.vayunmathur.screentime.action.DASHBOARD")
+ .setPackage("com.vayunmathur.screentime")
+}
diff --git a/res/drawable/ic_homepage_screen_time.xml b/res/drawable/ic_homepage_screen_time.xml
new file mode 100644
index 00000000000..6c2eb9eee03
--- /dev/null
+++ b/res/drawable/ic_homepage_screen_time.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/res/drawable/ic_settings_screen_time_expressive.xml b/res/drawable/ic_settings_screen_time_expressive.xml
new file mode 100644
index 00000000000..8103a8b868e
--- /dev/null
+++ b/res/drawable/ic_settings_screen_time_expressive.xml
@@ -0,0 +1,19 @@
+
+
diff --git a/src/com/android/settings/location/GnssSuplPrefController.java b/src/com/android/settings/location/GnssSuplPrefController.java
index 95be474c9de03f45e0ed05ab5e054e913bd0b633..6f2b3198ddeb9d018d75e7742965d98cf74591cf 100644
--- a/src/com/android/settings/location/GnssSuplPrefController.java
+++ b/src/com/android/settings/location/GnssSuplPrefController.java
@@ -34,7 +34,6 @@
@Override
protected void getEntries(Entries entries) {
entries.add(R.string.supl_enabled_grapheneos_proxy, GnssSettings.SUPL_SERVER_GRAPHENEOS_PROXY);
- entries.add(R.string.supl_enabled_standard_server, GnssSettings.SUPL_SERVER_STANDARD);
entries.add(R.string.supl_disabled, R.string.supl_disabled_summary, GnssSettings.SUPL_DISABLED);
}
}
diff --git a/src/com/android/settings/location/GnssPsdsPrefController.java b/src/com/android/settings/location/GnssPsdsPrefController.java
index 73279f2d23a0b2c416fc42ba5c0a3cbbd923a137..f1d9e09384b175937492c2349d8533b644f14e18 100644
--- a/src/com/android/settings/location/GnssPsdsPrefController.java
+++ b/src/com/android/settings/location/GnssPsdsPrefController.java
@@ -43,7 +43,6 @@
@Override
protected void getEntries(Entries entries) {
entries.add(R.string.psds_enabled_grapheneos_server, GnssSettings.PSDS_SERVER_GRAPHENEOS);
- entries.add(R.string.psds_enabled_standard_server, GnssSettings.PSDS_SERVER_STANDARD);
entries.add(R.string.psds_disabled, R.string.psds_disabled_summary, GnssSettings.PSDS_DISABLED);
}
}
diff --git a/res/values/strings_ext.xml b/res/values/strings_ext.xml
index 0b19916d085541257007bec7ad0c8de84066a50f..a20289c2822d5d908d36e84db2710ec070e2b5ab 100644
--- a/res/values/strings_ext.xml
+++ b/res/values/strings_ext.xml
@@ -49,7 +49,7 @@
Secure User Plane Location (SUPL)
A-GNSS (assisted satellite geolocation) based on nearby cell towers.
- GrapheneOS proxy
+ MAOS servers
Standard server
Off
Will make acquiring location lock significantly slower, especially if PSDS is turned off too
@@ -79,7 +79,7 @@
"If PSDS is turned on, static PSDS information files will be downloaded periodically to improve location resolution speed and accuracy.
No query or data is sent to the server. These files contain orbits and statuses of satellites, Earth environmental data and time adjustment information."
- GrapheneOS server
+ MAOS servers
Standard server
Off
Will make acquiring location lock significantly slower, especially if SUPL is turned off too
@@ -88,7 +88,7 @@
Storage Scopes
- GrapheneOS server
+ MAOS servers
Standard (Google) server
Off