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

Commit 10b889de authored by The Android Automerger's avatar The Android Automerger
Browse files

stephenli Manually merge commit '68fffa51'

* commit '68fffa51': (23 commits)
  Fix smallest width configuration calculation
  docs: DoDS, wearable reference docs
  Switch the default text selection handles to Material style.
  docs: Noted minor API changes in release notes
  docs: added "billions" doc in Distribute>Essentials
  Remove wear design pages redirecting to design/wear
  correct the support library redirects to redirect whole path
  Stop saving ActionMenuItemView state.
  Fix iterator double-advance in ContentObserverController
  TIF: Remove the uniqueness check for track ID from notifyTracksChanged
  Update and add attributes to the JavaDoc for VectorDrawable
  Use Q=100 JPEG instead of PNG for wallpaper display
  Fix issue #28400000: Settings memory UI still showing z-ram...
  docs: Updated support library revision history for 23.4.0
  docs: Updates to notifications for DP3
  docs: Added emoji section to api overview.
  Fixed a bug where the QS was animating wrong when closing
  Fix KeyguardManager.isSecure() to observe work profile
  cherrypick from mnc-docs docs: Updated APK Signature Scheme v2 doc.
  Docs: Added new Whitelist feature to Data Saver for DP3
  ...
parents 2173c753 68fffa51
Loading
Loading
Loading
Loading
+12 −28
Original line number Diff line number Diff line
@@ -472,12 +472,6 @@ public final class BluetoothAdapter {

    private static final int ADDRESS_LENGTH = 17;

    private static final int CONTROLLER_ENERGY_UPDATE_TIMEOUT_MILLIS = 30;
    /** @hide */
    public static final int ACTIVITY_ENERGY_INFO_CACHED = 0;
    /** @hide */
    public static final int ACTIVITY_ENERGY_INFO_REFRESHED = 1;

    /**
     * Lazily initialized singleton. Guaranteed final after first object
     * constructed.
@@ -1374,13 +1368,13 @@ public final class BluetoothAdapter {
     * @return a record with {@link BluetoothActivityEnergyInfo} or null if
     * report is unavailable or unsupported
     * @deprecated use the asynchronous
     * {@link #requestControllerActivityEnergyInfo(int, ResultReceiver)} instead.
     * {@link #requestControllerActivityEnergyInfo(ResultReceiver)} instead.
     * @hide
     */
    @Deprecated
    public BluetoothActivityEnergyInfo getControllerActivityEnergyInfo(int updateType) {
        SynchronousResultReceiver receiver = new SynchronousResultReceiver();
        requestControllerActivityEnergyInfo(updateType, receiver);
        requestControllerActivityEnergyInfo(receiver);
        try {
            SynchronousResultReceiver.Result result = receiver.awaitResult(1000);
            if (result.bundle != null) {
@@ -1400,36 +1394,26 @@ public final class BluetoothAdapter {
     * A null value for the activity info object may be sent if the bluetooth service is
     * unreachable or the device does not support reporting such information.
     *
     * @param updateType Type of info, cached vs refreshed.
     * @param result The callback to which to send the activity info.
     * @hide
     */
    public void requestControllerActivityEnergyInfo(int updateType, ResultReceiver result) {
        if (getState() != STATE_ON) {
            result.send(0, null);
            return;
        }

    public void requestControllerActivityEnergyInfo(ResultReceiver result) {
        try {
            if (!mService.isActivityAndEnergyReportingSupported()) {
                result.send(0, null);
                return;
            }
            synchronized(this) {
                if (updateType == ACTIVITY_ENERGY_INFO_REFRESHED) {
                    mService.getActivityEnergyInfoFromController();
                    wait(CONTROLLER_ENERGY_UPDATE_TIMEOUT_MILLIS);
                }
            synchronized(mManagerCallback) {
                if (mService != null) {
                    mService.requestActivityInfo(result);
                    result = null;
                }
            }
        } catch (InterruptedException e) {
            Log.e(TAG, "getControllerActivityEnergyInfoCallback wait interrupted: " + e);
            result.send(0, null);
        } catch (RemoteException e) {
            Log.e(TAG, "getControllerActivityEnergyInfoCallback: " + e);
        } finally {
            if (result != null) {
                // Only send an immediate result if we failed.
                result.send(0, null);
            }
        }
    }

    /**
     * Return the set of {@link BluetoothDevice} objects that are bonded
+0 −1
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ interface IBluetooth
    boolean isOffloadedFilteringSupported();
    boolean isOffloadedScanBatchingSupported();
    boolean isActivityAndEnergyReportingSupported();
    void getActivityEnergyInfoFromController();
    BluetoothActivityEnergyInfo reportActivityInfo();

    /**
+86 −79
Original line number Diff line number Diff line
@@ -309,6 +309,8 @@ public class ResourcesImpl {

    public void updateConfiguration(Configuration config, DisplayMetrics metrics,
                                    CompatibilityInfo compat) {
        Trace.traceBegin(Trace.TRACE_TAG_RESOURCES, "ResourcesImpl#updateConfiguration");
        try {
            synchronized (mAccessLock) {
                if (false) {
                    Slog.i(TAG, "**** Updating config of " + this + ": old config is "
@@ -342,7 +344,8 @@ public class ResourcesImpl {
                }
                if (mConfiguration.densityDpi != Configuration.DENSITY_DPI_UNDEFINED) {
                    mMetrics.densityDpi = mConfiguration.densityDpi;
                mMetrics.density = mConfiguration.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE;
                    mMetrics.density =
                            mConfiguration.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE;
                }
                mMetrics.scaledDensity = mMetrics.density * mConfiguration.fontScale;

@@ -359,7 +362,8 @@ public class ResourcesImpl {

                final int keyboardHidden;
                if (mConfiguration.keyboardHidden == Configuration.KEYBOARDHIDDEN_NO
                    && mConfiguration.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) {
                        && mConfiguration.hardKeyboardHidden
                        == Configuration.HARDKEYBOARDHIDDEN_YES) {
                    keyboardHidden = Configuration.KEYBOARDHIDDEN_SOFT;
                } else {
                    keyboardHidden = mConfiguration.keyboardHidden;
@@ -394,6 +398,9 @@ public class ResourcesImpl {
                    mPluralRule = PluralRules.forLocale(mConfiguration.getLocales().get(0));
                }
            }
        } finally {
            Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
        }
    }

    /**
+9 −0
Original line number Diff line number Diff line
@@ -676,6 +676,15 @@ public final class Debug
            return getTotalSwappedOutPss();
        }

        /**
         * Return true if the kernel is reporting pss swapped out...  that is, if
         * {@link #getSummaryTotalSwapPss()} will return non-0 values.
         * @hide
         */
        public boolean hasSwappedOutPss() {
            return hasSwappedOutPss;
        }

        public int describeContents() {
            return 0;
        }
+2 −1
Original line number Diff line number Diff line
@@ -1121,10 +1121,11 @@ public interface WindowManagerPolicy {
     * isKeyguardSecure
     *
     * Return whether the keyguard requires a password to unlock.
     * @param userId
     *
     * @return true if in keyguard is secure.
     */
    public boolean isKeyguardSecure();
    public boolean isKeyguardSecure(int userId);

    /**
     * Return whether the keyguard is on.
Loading