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

Commit 31a48c15 authored by David Ng's avatar David Ng
Browse files

Merge tag 'android-6.0.1_r3' into 601r3

Android 6.0.1 release 3

* tag 'android-6.0.1_r3': (151 commits)
  Revert "Fix race condition when setting default ringtones"
  Fix race condition when setting default ringtones
  Block directory selection in openable modes.
  Kick movement preconditions onto handler thread.
  Revert "Remove -ffast-math from libhwui makefile"
  When the incoming light source is invalid, don't generate any shadow
  Early return when the scale is 0.
  Remove -ffast-math from libhwui makefile
  Revert "Use clang for libhwui"
  Convert ashmem bitmap thresholds to constants.
  Use clang for libhwui
  Limit persistent ashmem backed fds to a minimum of 128kB.
  Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
  Fix a crash while printing ICCID because of alphabets in UICC.
  Fixed a bug where the panel could get stuck closing
  Improve comment on EXTRA_CALL_RAT_TYPE.
  NetworkTimeUpdateService: Grab a wakelock when manipulating system time
  Don't try overriding system fixed permissions on install
  PackageSettingBase needs to copy volume UUID.
  Handle "uninstalled" apps when pruning app-ops.
  ...

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
	services/core/java/com/android/server/MountService.java

Change-Id: I284176dc03556678a76e6b698db2a2b08ecee8c3
parents b042f08d 4d70bd7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -350,6 +350,7 @@ LOCAL_SRC_FILES += \
	media/java/android/media/IRingtonePlayer.aidl \
	media/java/android/media/IVolumeController.aidl \
	media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl \
	media/java/android/media/midi/IBluetoothMidiService.aidl \
	media/java/android/media/midi/IMidiDeviceListener.aidl \
	media/java/android/media/midi/IMidiDeviceOpenCallback.aidl \
	media/java/android/media/midi/IMidiDeviceServer.aidl \
+29 −0
Original line number Diff line number Diff line
@@ -694,6 +694,8 @@ public class Activity extends ContextThemeWrapper
    private static final String SAVED_DIALOGS_TAG = "android:savedDialogs";
    private static final String SAVED_DIALOG_KEY_PREFIX = "android:dialog_";
    private static final String SAVED_DIALOG_ARGS_KEY_PREFIX = "android:dialog_args_";
    private static final String HAS_CURENT_PERMISSIONS_REQUEST_KEY =
            "android:hasCurrentPermissionsRequest";

    private static final String REQUEST_PERMISSIONS_WHO_PREFIX = "@android:requestPermissions:";

@@ -802,6 +804,8 @@ public class Activity extends ContextThemeWrapper
    SharedElementCallback mEnterTransitionListener = SharedElementCallback.NULL_CALLBACK;
    SharedElementCallback mExitTransitionListener = SharedElementCallback.NULL_CALLBACK;

    private boolean mHasCurrentPermissionsRequest;

    /** Return the intent that started this activity. */
    public Intent getIntent() {
        return mIntent;
@@ -1303,6 +1307,7 @@ public class Activity extends ContextThemeWrapper
        onSaveInstanceState(outState);
        saveManagedDialogs(outState);
        mActivityTransitionState.saveState(outState);
        storeHasCurrentPermissionRequest(outState);
        if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState);
    }

@@ -1318,6 +1323,7 @@ public class Activity extends ContextThemeWrapper
    final void performSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
        onSaveInstanceState(outState, outPersistentState);
        saveManagedDialogs(outState);
        storeHasCurrentPermissionRequest(outState);
        if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState +
                ", " + outPersistentState);
    }
@@ -3845,8 +3851,15 @@ public class Activity extends ContextThemeWrapper
     * @see #shouldShowRequestPermissionRationale(String)
     */
    public final void requestPermissions(@NonNull String[] permissions, int requestCode) {
        if (mHasCurrentPermissionsRequest) {
            Log.w(TAG, "Can reqeust only one set of permissions at a time");
            // Dispatch the callback with empty arrays which means a cancellation.
            onRequestPermissionsResult(requestCode, new String[0], new int[0]);
            return;
        }
        Intent intent = getPackageManager().buildRequestPermissionsIntent(permissions);
        startActivityForResult(REQUEST_PERMISSIONS_WHO_PREFIX, intent, requestCode, null);
        mHasCurrentPermissionsRequest = true;
    }

    /**
@@ -6268,12 +6281,14 @@ public class Activity extends ContextThemeWrapper
    }

    final void performCreate(Bundle icicle) {
        restoreHasCurrentPermissionRequest(icicle);
        onCreate(icicle);
        mActivityTransitionState.readState(icicle);
        performCreateCommon();
    }

    final void performCreate(Bundle icicle, PersistableBundle persistentState) {
        restoreHasCurrentPermissionRequest(icicle);
        onCreate(icicle, persistentState);
        mActivityTransitionState.readState(icicle);
        performCreateCommon();
@@ -6452,6 +6467,19 @@ public class Activity extends ContextThemeWrapper
        return mResumed;
    }

    private void storeHasCurrentPermissionRequest(Bundle bundle) {
        if (bundle != null && mHasCurrentPermissionsRequest) {
            bundle.putBoolean(HAS_CURENT_PERMISSIONS_REQUEST_KEY, true);
        }
    }

    private void restoreHasCurrentPermissionRequest(Bundle bundle) {
        if (bundle != null) {
            mHasCurrentPermissionsRequest = bundle.getBoolean(
                    HAS_CURENT_PERMISSIONS_REQUEST_KEY, false);
        }
    }

    void dispatchActivityResult(String who, int requestCode,
        int resultCode, Intent data) {
        if (false) Log.v(
@@ -6579,6 +6607,7 @@ public class Activity extends ContextThemeWrapper
    }

    private void dispatchRequestPermissionsResult(int requestCode, Intent data) {
        mHasCurrentPermissionsRequest = false;
        // If the package installer crashed we may have not data - best effort.
        String[] permissions = (data != null) ? data.getStringArrayExtra(
                PackageManager.EXTRA_REQUEST_PERMISSIONS_NAMES) : new String[0];
+2 −1
Original line number Diff line number Diff line
@@ -1619,7 +1619,8 @@ final class ApplicationPackageManager extends PackageManager {
        // System apps and apps demanding internal storage can't be moved
        // anywhere else
        if (app.isSystemApp()
                || app.installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) {
                || app.installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY
                || app.installLocation == PackageInfo.INSTALL_LOCATION_UNSPECIFIED) {
            return false;
        }

+1 −4
Original line number Diff line number Diff line
@@ -460,9 +460,6 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
    // If set this fragment is being retained across the current config change.
    boolean mRetaining;

    // If set this fragment's loaders are being retained across the current config change.
    boolean mRetainLoader;

    // If set this fragment has menu items to contribute.
    boolean mHasMenu;

@@ -2404,7 +2401,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
                mLoaderManager = mHost.getLoaderManager(mWho, mLoadersStarted, false);
            }
            if (mLoaderManager != null) {
                if (mRetainLoader) {
                if (mHost.getRetainLoaders()) {
                    mLoaderManager.doRetain();
                } else {
                    mLoaderManager.doStop();
+0 −1
Original line number Diff line number Diff line
@@ -341,7 +341,6 @@ public class FragmentController {
     */
    public void doLoaderStop(boolean retain) {
        mHost.doLoaderStop(retain);
        mHost.mFragmentManager.setRetainLoader(retain);
    }

    /**
Loading