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

Commit 7ba07578 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4796401 from e8a35366 to pi-release

Change-Id: Ic5bdeccc568be53377d663913b75d827f6573f96
parents 2b2c6483 e8a35366
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -621,6 +621,19 @@ package android.os {
    method public static final int getThreadScheduler(int) throws java.lang.IllegalArgumentException;
  }

  public final class RemoteCallback implements android.os.Parcelable {
    ctor public RemoteCallback(android.os.RemoteCallback.OnResultListener);
    ctor public RemoteCallback(android.os.RemoteCallback.OnResultListener, android.os.Handler);
    method public int describeContents();
    method public void sendResult(android.os.Bundle);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.os.RemoteCallback> CREATOR;
  }

  public static abstract interface RemoteCallback.OnResultListener {
    method public abstract void onResult(android.os.Bundle);
  }

  public final class StrictMode {
    method public static void setViolationLogger(android.os.StrictMode.ViolationLogger);
    field public static final int DETECT_CUSTOM = 8; // 0x8
+19 −7
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@ public class Media extends BaseCommand {
            showError("Error: unknown dispatch code '" + cmd + "'");
            return;
        }

        final long now = SystemClock.uptimeMillis();
        sendMediaKey(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keycode, 0, 0,
                KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD));
@@ -189,7 +188,6 @@ public class Media extends BaseCommand {
        @Override
        public void onSessionDestroyed() {
            System.out.println("onSessionDestroyed. Enter q to quit.");

        }

        @Override
@@ -246,7 +244,7 @@ public class Media extends BaseCommand {
                @Override
                protected void onLooperPrepared() {
                    try {
                        mController.registerCallbackListener(ControllerMonitor.this);
                        mController.registerCallbackListener(PACKAGE_NAME, ControllerMonitor.this);
                    } catch (RemoteException e) {
                        System.out.println("Error registering monitor callback");
                    }
@@ -266,13 +264,13 @@ public class Media extends BaseCommand {
                    } else if ("q".equals(line) || "quit".equals(line)) {
                        break;
                    } else if ("play".equals(line)) {
                        mController.play(PACKAGE_NAME);
                        dispatchKeyCode(KeyEvent.KEYCODE_MEDIA_PLAY);
                    } else if ("pause".equals(line)) {
                        mController.pause(PACKAGE_NAME);
                        dispatchKeyCode(KeyEvent.KEYCODE_MEDIA_PAUSE);
                    } else if ("next".equals(line)) {
                        mController.next(PACKAGE_NAME);
                        dispatchKeyCode(KeyEvent.KEYCODE_MEDIA_NEXT);
                    } else if ("previous".equals(line)) {
                        mController.previous(PACKAGE_NAME);
                        dispatchKeyCode(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
                    } else {
                        System.out.println("Invalid command: " + line);
                    }
@@ -295,6 +293,20 @@ public class Media extends BaseCommand {
                }
            }
        }

        private void dispatchKeyCode(int keyCode) {
            final long now = SystemClock.uptimeMillis();
            KeyEvent down = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0, 0,
                    KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD);
            KeyEvent up = new KeyEvent(now, now, KeyEvent.ACTION_UP, keyCode, 0, 0,
                    KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD);
            try {
                mController.sendMediaButton(PACKAGE_NAME, null, false, down);
                mController.sendMediaButton(PACKAGE_NAME, null, false, up);
            } catch (RemoteException e) {
                System.out.println("Failed to dispatch " + keyCode);
            }
        }
    }

    private void runListSessions() {
+5 −1
Original line number Diff line number Diff line
@@ -385,7 +385,11 @@ void StatsLogProcessor::onConfigMetricsReportLocked(const ConfigKey& key,
    // This skips the uid map if it's an empty config.
    if (it->second->getNumMetrics() > 0) {
        uint64_t uidMapToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_ID_UID_MAP);
        if (it->second->hashStringInReport()) {
            mUidMap->appendUidMap(dumpTimeStampNs, key, &str_set, proto);
        } else {
            mUidMap->appendUidMap(dumpTimeStampNs, key, nullptr, proto);
        }
        proto->end(uidMapToken);
    }

+9 −2
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ MetricsManager::MetricsManager(const ConfigKey& key, const StatsdConfig& config,
                             mAllPeriodicAlarmTrackers, mConditionToMetricMap, mTrackerToMetricMap,
                             mTrackerToConditionMap, mNoReportMetricIds);

    mHashStringsInReport = config.hash_strings_in_metric_report();

    if (config.allowed_log_source_size() == 0) {
        mConfigValid = false;
        ALOGE("Log source whitelist is empty! This config won't get any data. Suggest adding at "
@@ -201,8 +203,13 @@ void MetricsManager::onDumpReport(const int64_t dumpTimeStampNs,
        if (mNoReportMetricIds.find(producer->getMetricId()) == mNoReportMetricIds.end()) {
            uint64_t token = protoOutput->start(
                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_METRICS);
            if (mHashStringsInReport) {
                producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, str_set,
                                       protoOutput);
            } else {
                producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, nullptr,
                                       protoOutput);
            }
            protoOutput->end(token);
        } else {
            producer->clearPastBuckets(dumpTimeStampNs);
+6 −0
Original line number Diff line number Diff line
@@ -77,6 +77,10 @@ public:
        return mTtlNs <= 0 || timestampNs < mTtlEndNs;
    };

    inline bool hashStringInReport() const {
        return mHashStringsInReport;
    };

    void refreshTtl(const int64_t currentTimestampNs) {
        if (mTtlNs > 0) {
            mTtlEndNs = currentTimestampNs + mTtlNs;
@@ -118,6 +122,8 @@ private:

    bool mConfigValid = false;

    bool mHashStringsInReport = false;

    const int64_t mTtlNs;
    int64_t mTtlEndNs;

Loading