Merge cherrypicks of [9169765, 9170440, 9170173, 9170474, 9170250, 9170251, 9170252, 9170462, 9170463, 9170464, 9170264, 9170422, 9170465] into qt-release
Change-Id: I9ef106161cbd0428a37bf4e4d56ca303370ea3bc
This commit is contained in:
@@ -4143,6 +4143,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>
|
||||
</resources>
|
||||
|
||||
@@ -3813,6 +3813,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="drawable" name="android_logotype" />
|
||||
<java-symbol type="layout" name="platlogo_layout" />
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -292,6 +292,10 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
|
||||
|
||||
private int getPreferredLaunchDisplay(@Nullable TaskRecord task,
|
||||
@Nullable ActivityOptions options, ActivityRecord source, LaunchParams currentParams) {
|
||||
if (!mSupervisor.mService.mSupportsMultiDisplay) {
|
||||
return DEFAULT_DISPLAY;
|
||||
}
|
||||
|
||||
int displayId = INVALID_DISPLAY;
|
||||
final int optionLaunchId = options != null ? options.getLaunchDisplayId() : INVALID_DISPLAY;
|
||||
if (optionLaunchId != INVALID_DISPLAY) {
|
||||
|
||||
@@ -1225,6 +1225,22 @@ public class TaskLaunchParamsModifierTests extends ActivityTestsBase {
|
||||
assertEquals(startingBounds, adjustedBounds);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoMultiDisplaySupports() {
|
||||
final boolean orgValue = mService.mSupportsMultiDisplay;
|
||||
final TestActivityDisplay display = createNewActivityDisplay(WINDOWING_MODE_FULLSCREEN);
|
||||
mCurrent.mPreferredDisplayId = display.mDisplayId;
|
||||
|
||||
try {
|
||||
mService.mSupportsMultiDisplay = false;
|
||||
assertEquals(RESULT_CONTINUE, mTarget.onCalculate(/* task */ null, /* layout */ null,
|
||||
mActivity, /* source */ null, /* options */ null, mCurrent, mResult));
|
||||
assertEquals(DEFAULT_DISPLAY, mResult.mPreferredDisplayId);
|
||||
} finally {
|
||||
mService.mSupportsMultiDisplay = orgValue;
|
||||
}
|
||||
}
|
||||
|
||||
private TestActivityDisplay createNewActivityDisplay(int windowingMode) {
|
||||
final TestActivityDisplay display = addNewActivityDisplayAt(ActivityDisplay.POSITION_TOP);
|
||||
display.setWindowingMode(windowingMode);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user