diff options
13 files changed, 59 insertions, 10 deletions
diff --git a/core/java/android/hardware/radio/TunerAdapter.java b/core/java/android/hardware/radio/TunerAdapter.java index be2846f87079..aa5480abafb4 100644 --- a/core/java/android/hardware/radio/TunerAdapter.java +++ b/core/java/android/hardware/radio/TunerAdapter.java @@ -271,6 +271,8 @@ class TunerAdapter extends RadioTuner { mCallback.setProgramListObserver(list, () -> { try { mTuner.stopProgramListUpdates(); + } catch (IllegalStateException ex) { + // it's fine to not stop updates if tuner is already closed } catch (RemoteException ex) { Log.e(TAG, "Couldn't stop program list updates", ex); } diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 4eee1dbda6ba..df879816facb 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -4241,6 +4241,10 @@ one bar higher than they actually are --> <bool name="config_inflateSignalStrength">false</bool> + <!-- Contains a blacklist of apps that should not get pre-installed carrier app permission + grants, even if the UICC claims that the app should be privileged. See b/138150105 --> + <string-array name="config_restrictedPreinstalledCarrierApps" translatable="false"/> + <!-- Sharesheet: define a max number of targets per application for new shortcuts-based direct share introduced in Q --> <integer name="config_maxShortcutTargetsPerApp">3</integer> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index a28bec9ce622..92c5d2cf88df 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3827,6 +3827,7 @@ <java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" /> <java-symbol type="bool" name="config_inflateSignalStrength" /> + <java-symbol type="array" name="config_restrictedPreinstalledCarrierApps" /> <java-symbol type="array" name="config_highRefreshRateBlacklist" /> diff --git a/packages/PrintSpooler/res/values-or/strings.xml b/packages/PrintSpooler/res/values-or/strings.xml index 7eeac8771032..f385391c8d78 100644 --- a/packages/PrintSpooler/res/values-or/strings.xml +++ b/packages/PrintSpooler/res/values-or/strings.xml @@ -72,7 +72,7 @@ <string name="select_to_add_printers" msgid="3800709038689830974">"ପ୍ରିଣ୍ଟର ଯୋଡ଼ିବାକୁ ଚୟନ କରନ୍ତୁ"</string> <string name="enable_print_service" msgid="3482815747043533842">"ସକ୍ଷମ କରିବା ପାଇଁ ଚୟନ କରନ୍ତୁ"</string> <string name="enabled_services_title" msgid="7036986099096582296">"ସକ୍ଷମ କରାଯାଇଥିବା ସର୍ଭିସ୍"</string> - <string name="recommended_services_title" msgid="3799434882937956924">"ସୁପାରିସ କରାଯାଇଥିବା ସର୍ଭିସ୍"</string> + <string name="recommended_services_title" msgid="3799434882937956924">"ସୁପାରିଶ କରାଯାଇଥିବା ସର୍ଭିସ୍"</string> <string name="disabled_services_title" msgid="7313253167968363211">"ଅକ୍ଷମ କରାଯାଇଥିବା ସର୍ଭିସ୍"</string> <string name="all_services_title" msgid="5578662754874906455">"ସମସ୍ତ ସର୍ଭିସ୍"</string> <plurals name="print_services_recommendation_subtitle" formatted="false" msgid="5678487708807185138"> diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java index a4b6958498c8..517abac671b5 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -253,6 +253,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected void onUserInput() { if (mCallback != null) { mCallback.userActivity(); + mCallback.onUserInput(); } mSecurityMessageDisplay.setMessage(""); } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java index 55ddfc30d774..56b38f7382fa 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternView.java @@ -274,6 +274,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit @Override public void onPatternCellAdded(List<LockPatternView.Cell> pattern) { mCallback.userActivity(); + mCallback.onUserInput(); } @Override @@ -336,6 +337,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit }); if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) { mCallback.userActivity(); + mCallback.onUserInput(); } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java index cbfbffbe50a4..49dcfffb0d72 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityCallback.java @@ -55,4 +55,9 @@ public interface KeyguardSecurityCallback { default void onCancelClicked() { // No-op } + + /** + * Invoked whenever users are typing their password or drawing a pattern. + */ + void onUserInput(); } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index 8059dcf33df7..169c97b1ce22 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -596,6 +596,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe } } + @Override + public void onUserInput() { + mUpdateMonitor.cancelFaceAuth(); + } + public void dismiss(boolean authenticated, int targetId) { mSecurityCallback.dismiss(authenticated, targetId); } @@ -640,6 +645,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe @Override public void dismiss(boolean securityVerified, int targetUserId) { } @Override + public void onUserInput() { } + @Override public void reset() {} }; diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 8f7070e814f6..72ad99378eb0 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -1641,6 +1641,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { updateFaceListeningState(); } + /** + * In case face auth is running, cancel it. + */ + public void cancelFaceAuth() { + stopListeningForFace(); + } + private void updateFaceListeningState() { // If this message exists, we should not authenticate again until this message is // consumed by the handler diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java index e0c6c55c2e59..6a7477945cdd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java @@ -31,6 +31,7 @@ import android.hardware.input.InputManager; import android.os.Looper; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.util.Log; import android.util.MathUtils; import android.view.Gravity; @@ -66,7 +67,8 @@ import java.util.concurrent.Executor; public class EdgeBackGestureHandler implements DisplayListener { private static final String TAG = "EdgeBackGestureHandler"; - private static final int MAX_LONG_PRESS_TIMEOUT = 250; + private static final int MAX_LONG_PRESS_TIMEOUT = SystemProperties.getInt( + "gestures.back_timeout", 250); private final IPinnedStackListener.Stub mImeChangedListener = new IPinnedStackListener.Stub() { @Override diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 7cbf919b3d00..a7d436ab87b4 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -320,7 +320,6 @@ import com.android.server.pm.permission.PermissionManagerServiceInternal; import com.android.server.pm.permission.PermissionManagerServiceInternal.PermissionCallback; import com.android.server.pm.permission.PermissionsState; import com.android.server.policy.PermissionPolicyInternal; -import com.android.server.policy.PermissionPolicyInternal.OnInitializedCallback; import com.android.server.security.VerityUtils; import com.android.server.storage.DeviceStorageMonitorInternal; import com.android.server.wm.ActivityTaskManagerInternal; @@ -11033,14 +11032,15 @@ public class PackageManagerService extends IPackageManager.Stub final String realPkgName = request.realPkgName; final List<String> changedAbiCodePath = result.changedAbiCodePath; final PackageSetting pkgSetting; + if (request.pkgSetting != null && request.pkgSetting.sharedUser != null + && request.pkgSetting.sharedUser != result.pkgSetting.sharedUser) { + // shared user changed, remove from old shared user + request.pkgSetting.sharedUser.removePackage(request.pkgSetting); + } if (result.existingSettingCopied) { pkgSetting = request.pkgSetting; pkgSetting.updateFrom(result.pkgSetting); pkg.mExtras = pkgSetting; - if (pkgSetting.sharedUser != null - && pkgSetting.sharedUser.removePackage(result.pkgSetting)) { - pkgSetting.sharedUser.addPackage(pkgSetting); - } } else { pkgSetting = result.pkgSetting; if (originalPkgSetting != null) { @@ -11050,6 +11050,9 @@ public class PackageManagerService extends IPackageManager.Stub mTransferedPackages.add(originalPkgSetting.name); } } + if (pkgSetting.sharedUser != null) { + pkgSetting.sharedUser.addPackage(pkgSetting); + } // TODO(toddke): Consider a method specifically for modifying the Package object // post scan; or, moving this stuff out of the Package object since it has nothing // to do with the package on disk. diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 3a4fe19233c0..1ce9505c1cfa 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -468,6 +468,14 @@ public class CarrierConfigManager { "notify_handover_video_from_wifi_to_lte_bool"; /** + * Flag specifying whether the carrier supports merging a RTT call with a voice call, + * downgrading the call in the process. + * @hide + */ + public static final String KEY_ALLOW_MERGING_RTT_CALLS_BOOL = + "allow_merging_rtt_calls_bool"; + + /** * Flag specifying whether the carrier wants to notify the user when a VT call has been handed * over from LTE to WIFI. * <p> @@ -3065,6 +3073,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CARRIER_VOLTE_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VT_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL, false); + sDefaults.putBoolean(KEY_ALLOW_MERGING_RTT_CALLS_BOOL, false); sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_LTE_TO_WIFI_BOOL, false); sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true); sDefaults.putString(KEY_DEFAULT_VM_NUMBER_STRING, ""); diff --git a/telephony/java/com/android/internal/telephony/CarrierAppUtils.java b/telephony/java/com/android/internal/telephony/CarrierAppUtils.java index a1bea4d417f9..d4ed9234569b 100644 --- a/telephony/java/com/android/internal/telephony/CarrierAppUtils.java +++ b/telephony/java/com/android/internal/telephony/CarrierAppUtils.java @@ -21,6 +21,7 @@ import android.content.ContentResolver; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; +import android.content.res.Resources; import android.os.RemoteException; import android.provider.Settings; import android.telephony.TelephonyManager; @@ -28,7 +29,9 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; +import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.ArrayUtils; import com.android.server.SystemConfig; import java.util.ArrayList; @@ -140,9 +143,12 @@ public final class CarrierAppUtils { try { for (ApplicationInfo ai : candidates) { String packageName = ai.packageName; - boolean hasPrivileges = telephonyManager != null && - telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) == - TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS; + String[] restrictedCarrierApps = Resources.getSystem().getStringArray( + R.array.config_restrictedPreinstalledCarrierApps); + boolean hasPrivileges = telephonyManager != null + && telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName) + == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS + && !ArrayUtils.contains(restrictedCarrierApps, packageName); // add hiddenUntilInstalled flag for carrier apps and associated apps packageManager.setSystemAppHiddenUntilInstalled(packageName, true); |