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

Unverified Commit f67897bc authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-10.0.0_r37' into staging/lineage-17.1_merge-android-10.0.0_r37

Android 10.0.0 Release 37 (QQ3A.200605.001)

* tag 'android-10.0.0_r37':
  DO NOT MERGE Fix ImageWallpaper memory regression
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Don't crash if NSSL gets incomplete gesture
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Fix order of uid/pid in LocationAccessPolicy
  RESTRICT AUTOMERGE
  RESTRICT AUTOMERGE
  Verify all possible hosts that match web nav
  Verify all possible hosts that match web nav
  Verify all possible hosts that match web nav
  Verify all possible hosts that match web nav
  Verify all possible hosts that match web nav
  RESTRICT AUTOMERGE
  RESTRICT AUTOMERGE
  Revert "Revoke 'always' web handler status when not autoverifying"
  Revert "Revoke 'always' web handler status when not autoverifying"
  Revert "Revoke 'always' web handler status when not autoverifying"
  Fix Battery optimization takes long time
  Import translations. DO NOT MERGE
  Check DUMP permission before dumping in RollbackManagerService.
  Check permissions in INetworkManagementService#setIPv6AddrGenMode
  Require a more specific intent
  Fix command injection on screencap
  Failed UiModeManagerServiceTest
  Revert "Revoke 'always' web handler status when not autoverifying"
  Import translations. DO NOT MERGE
  Force update uid state when pending uid state is applied
  Notify all packages is uid-mode is changed
  Import translations. DO NOT MERGE
  Disable deep press when long press is long
  Import translations. DO NOT MERGE
  Revert "Revoke 'always' web handler status when not autoverifying"
  DO NOT MERGE Institute limit on PhoneStateListener
  Fix broken link
  DO NOT MERGE use left/right insets instead of cutout
  DO NOT MERGE: Add blacklist for camera protection
  5G Q backport
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Create different KeyId for saved and suggestion network
  String change for ConnectionFailureNotifier
  Do not allow division by 0
  Move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor.
  DO NOT MERGE: Use status_bar_padding_top
  RESTRICT AUTOMERGE Prevent accessing companion records from arbitrary uids
  RESTRICT AUTOMERGE Prevent accessing companion records from arbitrary uids
  Import translations. DO NOT MERGE
  RESTRICT AUTOMERGE Prevent accessing companion records from arbitrary uids
  Camera: Clarify CAMERA_OPEN_CLOSE_LISTENER description
  Import translations. DO NOT MERGE
  DO NOT MERGE Optimizing ScreenDecorations performance
  [RESTRICT AUTOMERGE] Allow bar to be transparent during animating.
  Fix race condition while WallpaperMS rebinding service.
  Either reuse sensor values or don't dim down at all
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  DO NOT MERGE: Allow corner UI to decouple from rounded_corner_radius
  DO NOT MERGE - Kill apps outright for API contract violations
  Properly rotate cutout protection rect
  [DO NOT MERGE] Allows the Assistant to request suppression of fling
  Camera: Add new hidden API for camera open/close callback
  Allow two finger swipes down.
  RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities
  DO NOT MERGE Add null check for status bar transitions
  DO NOT MERGE Ignore insets on status_bar_container
  RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display
  RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display
  Fix bluetooth can't turn off during network reset (2/3)
  DO NOT MERGE: Resolve mBehindAlpha with mCurrentBehindAlpha
  Do not accept NaN as scrim values
  Reset protection path on rotation
  Revert "[automerger skipped] Merge "DO NOT MERGE - Kill apps out..."
  Animate cuttout protection
  DO NOT MERGE Set the sensor threshold only if sensor exists
  RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display
  RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  Frameworks/base: Support dex2oat cpu-set system property
  Create different KeyId for saved and suggestion network
  Add EAP methods in wifi.proto
  Remove Dependency.staticOnConfigurationChanged
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  Set/get allowed capture policy via AudioService.
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  DO NOT MERGE: Revert Move startInput for WINDOW_FOCUS_GAIN to background thread
  DO NOT MERGE: Revert: Freeup lock when IME is set inactive and unbound
  Updated wakeLock permission descriptions.
  CP ag/9571636 from master to qt-qpr1-dev Bug: 143299398
  Fix carrier config string typo.
  DO NOT MERGE Add toast message when bluetooth connects to voice recognition.
  AudioService - remove sendBroadcastToAll() from setMasterMuteInternalNoCallerCheck()
  Allow settingIgnored for DBH request if inEmergency
  Use status_bar_padding_top in QS system icons
  Resolve trust agents on USER_STARTED in addition to USER_ADDED.
  DO NOT MERGE: Add SystemUI support for front-facing camera protection
  RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities
  RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities
  DO NOT MERGE Fix Autohide functionality
  DO NOT MERGE Respect rounded.xml size in ScreenDecorations
  DO NOT MERGE Set background drawable on status_bar_container
  Add DEBUG flag for rounded corner and display cutout path
  RESTRICT AUTOMERGE Use Alternative Prox Sensor for Falsing
  DO NOT MERGE Have volume UI dismiss on home button press.
  RESTRICT AUTOMERGE Update keyguard locked state from TrustManagerService
  Back porting Dark theme bug fixes from R
  DO NOT MERGE Hold onto NotificationListener when reconnecting notifications UI.
  Add carrier config to skip validation if recently validate.
  DO NOT MERGE Dismiss system dialog
  DO NOT MERGE Reflect the selection state that reflects the current task stack upon restarting the Navigation Bar.
  Add cutout support in QSDetail
  Add vertical type check to prevent non-Automotive Androids from force displaying system bars.
  Fix potential NPE while releasing worker thread of ImageWallpaper
  DO NOT MERGE Adjust NotificationView bottom margin based on whether Keyboard is shown.
  Add null check for voiceInteractorComponentName.
  CountryDetector: Enable detector class override for automotive
  DO NOT MERGE - Added system user packages blacklist / whitelist to dump()
  DO NOT MERGE - Add flag to turn on/off the headless user specific blacklist/whitelist
  DO NOT MERGE - Enable blacklist for headless system user
  Fix flaky sysui crash in devicehealthchecks test.
  Disabled some DEBUG constants.
  Fix security issue in DynamicRefTable::load.
  Use the main thread to update alignment indication
  DO NOT MERGE - Kill apps outright for API contract violations
  Remove hidden shared account methods from AccountManager.java
  Add null check for handler on Clock view
  Make switching dialog full screen and change "Loading" text color.
  DO NOT MERGE - Kill apps outright for API contract violations
  Parcel only the canonical Uri.Part representation, not both.
  DO NOT MERGE - Use TimingsTraceLog on SystemServiceManager and VoiceInteractionManagerService.
  Call getPackageInfo() with cleared calling identity in ensureSystemPackageName().
  Add SafetyNet logging for package names read from config.
  DO NOT MERGE - Kill apps outright for API contract violations
  Force update uid state when pending uid state is applied
  Notify all packages is uid-mode is changed
  DO NOT MERGE Ensure package names read from config are system packages.
  DO NOT MERGE Ensure package names read from config are system packages.
  Call getPackageInfo() with cleared calling identity in ensureSystemPackageName().
  Re-activate backup service after cleaning a profile owner
  [DO NOT MERGE] Fix AoD front scrim being opaque at DOZE_PULSING
  resolve merge conflicts of 01f94b7c to qt-qpr1-dev
  Set a shorter timeout for logging a warn on slow IUserSwitchObservers.
  Added log statements to some user-switching tasks.
  Change coverage dump to specify the output file instead of directory.
  Add JVMTI agent to dump/reset JaCoCo coverage information
  Don't crash system process on empty onTuneFailed
  Update redaction upon profile changes
  Fixed NPE in package installer session.
  [framework] Remove boot complete marker
  DO NOT MERGE Unregister notification listener before creating a new one to avoid duplicate Heads Up notifications.
  Separate icon sizes for sharesheet and resolver list.
  DO NOT MERGE Ensure package names read from config are system packages.
  RESTRICT AUTOMERGE Update keyguard locked state from TrustManagerService
  Fix serialization issue of ExternalVibration
  GraphicsEnv: refactor to unify the debuggable logic
  DO NOT MERGE Only set the LAYOUT flags if the window is fullscreen
  Only suspend package from system or shell
  Adding option in global setting to control the display message during user switch
  Update mOnDissmissRunnable when Notification gets updated.
  Ensure adb key store is instantiated before revoking grants
  Do not destroy CustomTile when in QSCustomizer
  Handle ParcelableException instead of crashing system server
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Fix potential double destroy of AssetManager
  Change permissionLevel of ACCESS_SHORTCUTS and UNLIMITED_SHORTCUTS_API_CALLS
  Fix potential double destroy of AssetManager
  DO NOT MERGE Fix AppOpsServiceTest
  DO NOT MERGE: Use a copy of bt device profile list when updating
  Fix IsolatedUidAllocator for non-primary users.
  DO NOT MERGE Don't throw exception in AppOpsManager.checkOp
  DO NOT MERGE Remove unnecessary internal APIs.
  Prevent sending early termination of appop use
  DO NOT MERGE SetMode: Don't call into PM with AppOps lock held
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Fix ModuleInfoProviderTest by passing correct flag
  Refactor CountryDetectorService
  Revoke 'always' web handler status when not autoverifying
  Revoke 'always' web handler status when not autoverifying
  Supplementary Services(SS) gray out when airplane mode on in Call Settings menu.
  Revoke 'always' web handler status when not autoverifying
  Revoke 'always' web handler status when not autoverifying
  Revoke 'always' web handler status when not autoverifying
  [DO NOT MERGE] Add a configuration to allow disabling auto-suspend
  DO NOT MERGE: Adds artificial package handler latency
  Concurrent collections for Bluetooth callbacks.
  FocusRequester: fix NPE

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
	packages/SystemUI/res/layout/system_icons.xml
	packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java
	packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
	packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
	services/core/java/com/android/server/BluetoothManagerService.java
	services/core/java/com/android/server/NetworkManagementService.java
	services/core/java/com/android/server/input/InputManagerService.java
	services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java

Change-Id: I9bcfb8567a49063d8427986f7fc2fba8e19b241e
parents 63fc6d8c 81ee1024
Loading
Loading
Loading
Loading
+33 −5
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/fb.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/wait.h>

#include <binder/ProcessState.h>

@@ -99,11 +100,38 @@ static uint32_t dataSpaceToInt(ui::Dataspace d)
}

static status_t notifyMediaScanner(const char* fileName) {
    String8 cmd("am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file://");
    cmd.append(fileName);
    cmd.append(" > /dev/null");
    int result = system(cmd.string());
    if (result < 0) {
    std::string filePath("file://");
    filePath.append(fileName);
    char *cmd[] = {
        (char*) "am",
        (char*) "broadcast",
        (char*) "am",
        (char*) "android.intent.action.MEDIA_SCANNER_SCAN_FILE",
        (char*) "-d",
        &filePath[0],
        nullptr
    };

    int status;
    int pid = fork();
    if (pid < 0){
       fprintf(stderr, "Unable to fork in order to send intent for media scanner.\n");
       return UNKNOWN_ERROR;
    }
    if (pid == 0){
        int fd = open("/dev/null", O_WRONLY);
        if (fd < 0){
            fprintf(stderr, "Unable to open /dev/null for media scanner stdout redirection.\n");
            exit(1);
        }
        dup2(fd, 1);
        int result = execvp(cmd[0], cmd);
        close(fd);
        exit(result);
    }
    wait(&status);

    if (status < 0) {
        fprintf(stderr, "Unable to broadcast intent for media scanner.\n");
        return UNKNOWN_ERROR;
    }
+0 −29
Original line number Diff line number Diff line
@@ -1942,35 +1942,6 @@ public class AccountManager {
        }.start();
    }

    /**
     * @hide
     * Removes the shared account.
     * @param account the account to remove
     * @param user the user to remove the account from
     * @return
     */
    public boolean removeSharedAccount(final Account account, UserHandle user) {
        try {
            boolean val = mService.removeSharedAccountAsUser(account, user.getIdentifier());
            return val;
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
    }

    /**
     * @hide
     * @param user
     * @return
     */
    public Account[] getSharedAccounts(UserHandle user) {
        try {
            return mService.getSharedAccountsAsUser(user.getIdentifier());
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
    }

    /**
     * Confirms that the user knows the password for an account to make extra
     * sure they are the owner of the account.  The user-entered password can
+0 −3
Original line number Diff line number Diff line
@@ -80,14 +80,11 @@ interface IAccountManager {
        String authTokenType);

    /* Shared accounts */
    Account[] getSharedAccountsAsUser(int userId);
    boolean removeSharedAccountAsUser(in Account account, int userId);
    void addSharedAccountsFromParentUser(int parentUserId, int userId, String opPackageName);

    /* Account renaming. */
    void renameAccount(in IAccountManagerResponse response, in Account accountToRename, String newName);
    String getPreviousName(in Account account);
    boolean renameSharedAccountAsUser(in Account accountToRename, String newName, int userId);

    /* Add account in two steps. */
    void startAddAccountSession(in IAccountManagerResponse response, String accountType,
+3 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.content.pm.UserInfo;
import android.os.Bundle;
import android.os.IBinder;
import android.os.TransactionTooLargeException;
import android.view.RemoteAnimationAdapter;

import java.util.ArrayList;
import java.util.List;
@@ -345,4 +344,7 @@ public abstract class ActivityManagerInternal {
     * Unregisters the specified {@code processObserver}.
     */
    public abstract void unregisterProcessObserver(IProcessObserver processObserver);

    /** Returns true if the given UID is registered as an active instrumentation. */
    public abstract boolean isActiveInstrumentation(int uid);
}
+0 −29
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.app;

import android.annotation.NonNull;
import android.util.SparseIntArray;

import com.android.internal.util.function.QuadFunction;
@@ -76,20 +75,6 @@ public abstract class AppOpsManagerInternal {
     */
    public abstract void setDeviceAndProfileOwners(SparseIntArray owners);

    /**
     * Sets the app-ops mode for a certain app-op and uid.
     *
     * <p>Similar as {@link AppOpsManager#setUidMode} but does not require the package manager to be
     * working. Hence this can be used very early during boot.
     *
     * <p>Only for internal callers. Does <u>not</u> verify that package name belongs to uid.
     *
     * @param code The op code to set.
     * @param uid The UID for which to set.
     * @param mode The new mode to set.
     */
    public abstract void setUidMode(int code, int uid, int mode);

    /**
     * Set all {@link #setMode (package) modes} for this uid to the default value.
     *
@@ -97,18 +82,4 @@ public abstract class AppOpsManagerInternal {
     * @param uid The uid
     */
    public abstract void setAllPkgModesToDefault(int code, int uid);

    /**
     * Get the (raw) mode of an app-op.
     *
     * <p>Does <u>not</u> verify that package belongs to uid. The caller needs to do that.
     *
     * @param code The code of the op
     * @param uid The uid of the package the op belongs to
     * @param packageName The package the op belongs to
     *
     * @return The mode of the op
     */
    public abstract @AppOpsManager.Mode int checkOperationUnchecked(int code, int uid,
            @NonNull String packageName);
}
Loading