Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 721f8922 authored by Luca Stefani's avatar Luca Stefani
Browse files

Merge tag 'android-10.0.0_r35' into lineage-17.1-android-10.0.0_r35

Android 10.0.0 release 35

* tag 'android-10.0.0_r35':
  RESTRICT AUTOMERGE
  Update redaction upon profile changes
  RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display
  DO NOT MERGE - Kill apps outright for API contract violations
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  Add SafetyNet logging for package names read from config.
  RESTRICT AUTOMERGE Update keyguard locked state from TrustManagerService
  Call getPackageInfo() with cleared calling identity in ensureSystemPackageName().
  DO NOT MERGE Ensure package names read from config are system packages.

Change-Id: Ib7f2be160ce09204655360b5e51f5af59a7cac4d
parents 4b997a53 62b1d634
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -287,7 +287,8 @@ interface IActivityManager {
    void handleApplicationStrictModeViolation(in IBinder app, int penaltyMask,
            in StrictMode.ViolationInfo crashInfo);
    boolean isTopActivityImmersive();
    void crashApplication(int uid, int initialPid, in String packageName, int userId, in String message);
    void crashApplication(int uid, int initialPid, in String packageName, int userId,
            in String message, boolean force);
    @UnsupportedAppUsage
    String getProviderMimeType(in Uri uri, int userId);
    // Cause the specified process to dump the specified heap.
+11 −0
Original line number Diff line number Diff line
@@ -1067,6 +1067,17 @@ public class KeyStore {
        return onUserPasswordChanged(UserHandle.getUserId(Process.myUid()), newPassword);
    }

    /**
     * Notify keystore about the latest user locked state. This is to support keyguard-bound key.
     */
    public void onUserLockedStateChanged(int userHandle, boolean locked) {
        try {
            mBinder.onKeyguardVisibilityChanged(locked, userHandle);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to update user locked state " + userHandle, e);
        }
    }

    private class KeyAttestationCallbackResult {
        private KeystoreResponse keystoreResponse;
        private KeymasterCertificateChain certificateChain;
+5 −2
Original line number Diff line number Diff line
@@ -570,6 +570,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
        mRoundnessManager.setAnimatedChildren(mChildrenToAddAnimated);
        mRoundnessManager.setOnRoundingChangedCallback(this::invalidate);
        addOnExpandedHeightChangedListener(mRoundnessManager::setExpanded);
        mLockscreenUserManager.addUserChangedListener(userId ->
                updateSensitiveness(false /* animated */));
        setOutlineProvider(mOutlineProvider);

        // Blocking helper manager wants to know the expanded state, update as well.
@@ -4608,7 +4610,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    private void setHideSensitive(boolean hideSensitive, boolean animate) {
    private void updateSensitiveness(boolean animate) {
        boolean hideSensitive = mLockscreenUserManager.isAnyProfilePublicMode();
        if (hideSensitive != mAmbientState.isHideSensitive()) {
            int childCount = getChildCount();
            for (int i = 0; i < childCount; i++) {
@@ -5312,7 +5315,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd

        SysuiStatusBarStateController state = (SysuiStatusBarStateController)
                Dependency.get(StatusBarStateController.class);
        setHideSensitive(publicMode, state.goingToFullShade() /* animate */);
        updateSensitiveness(state.goingToFullShade() /* animate */);
        setDimmed(onKeyguard, state.fromShadeLocked() /* animate */);
        setExpandingEnabled(!onKeyguard);
        ActivatableNotificationView activatedChild = getActivatedChild();
+17 −1
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.EmptyShadeView;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShelf;
@@ -119,6 +121,8 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    @Mock private MetricsLogger mMetricsLogger;
    @Mock private NotificationRoundnessManager mNotificationRoundnessManager;
    @Mock private KeyguardBypassController mKeyguardBypassController;
    @Mock private NotificationLockscreenUserManager mLockscreenUserManager;
    private UserChangedListener mUserChangedListener;
    private TestableNotificationEntryManager mEntryManager;
    private int mOriginalInterruptionModelSetting;

@@ -137,7 +141,9 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        mDependency.injectTestDependency(
                NotificationBlockingHelperManager.class,
                mBlockingHelperManager);
        mDependency.injectTestDependency(SysuiStatusBarStateController.class, mBarState);
        mDependency.injectTestDependency(NotificationLockscreenUserManager.class,
                mLockscreenUserManager);
        mDependency.injectTestDependency(StatusBarStateController.class, mBarState);
        mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
        mDependency.injectTestDependency(NotificationRemoteInputManager.class,
                mRemoteInputManager);
@@ -152,6 +158,8 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {


        NotificationShelf notificationShelf = mock(NotificationShelf.class);
        ArgumentCaptor<UserChangedListener> userChangedCaptor = ArgumentCaptor
                .forClass(UserChangedListener.class);

        // The actual class under test.  You may need to work with this class directly when
        // testing anonymous class members of mStackScroller, like mMenuEventListener,
@@ -174,6 +182,8 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        mStackScroller.setGroupManager(mGroupManager);
        mStackScroller.setEmptyShadeView(mEmptyShadeView);
        mStackScroller.setIconAreaController(mNotificationIconAreaController);
        verify(mLockscreenUserManager).addUserChangedListener(userChangedCaptor.capture());
        mUserChangedListener = userChangedCaptor.getValue();

        // Stub out functionality that isn't necessary to test.
        doNothing().when(mBar)
@@ -246,6 +256,12 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        verify(mBlockingHelperManager).setNotificationShadeExpanded(100f);
    }

    @Test
    public void testOnStatePostChange_verifyIfProfileIsPublic() {
        mUserChangedListener.onUserChanged(0);
        verify(mLockscreenUserManager).isAnyProfilePublicMode();
    }

    @Test
    public void manageNotifications_visible() {
        FooterView view = mock(FooterView.class);
+10 −1
Original line number Diff line number Diff line
@@ -833,6 +833,15 @@ public final class ActiveServices {
        }
    }

    void killMisbehavingService(ServiceRecord r,
            int appUid, int appPid, String localPackageName) {
        synchronized (mAm) {
            stopServiceLocked(r);
            mAm.crashApplication(appUid, appPid, localPackageName, -1,
                    "Bad notification for startForeground", true /*force*/);
        }
    }

    IBinder peekServiceLocked(Intent service, String resolvedType, String callingPackage) {
        ServiceLookupResult r = retrieveServiceLocked(service, null, resolvedType, callingPackage,
                Binder.getCallingPid(), Binder.getCallingUid(),
@@ -3933,7 +3942,7 @@ public final class ActiveServices {
    void serviceForegroundCrash(ProcessRecord app, CharSequence serviceRecord) {
        mAm.crashApplication(app.uid, app.pid, app.info.packageName, app.userId,
                "Context.startForegroundService() did not then call Service.startForeground(): "
                    + serviceRecord);
                    + serviceRecord, false /*force*/);
    }

    void scheduleServiceTimeoutLocked(ProcessRecord proc) {
Loading