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

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

Snap for 4698807 from b2e6e45d to pi-release

Change-Id: Ie992f5deec4eb1cb35cd1541dac5445a42039394
parents e67a3b3d b2e6e45d
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -38395,17 +38395,17 @@ package android.sax {
package android.se.omapi {
  public class Channel {
  public final class Channel implements java.nio.channels.Channel {
    method public void close();
    method public byte[] getSelectResponse();
    method public android.se.omapi.Session getSession();
    method public boolean isBasicChannel();
    method public boolean isClosed();
    method public boolean isOpen();
    method public boolean selectNext() throws java.io.IOException;
    method public byte[] transmit(byte[]) throws java.io.IOException;
  }
  public class Reader {
  public final class Reader {
    method public void closeSessions();
    method public java.lang.String getName();
    method public android.se.omapi.SEService getSEService();
@@ -38413,26 +38413,28 @@ package android.se.omapi {
    method public android.se.omapi.Session openSession() throws java.io.IOException;
  }
  public class SEService {
    ctor public SEService(android.content.Context, android.se.omapi.SEService.SecureElementListener);
  public final class SEService {
    ctor public SEService(android.content.Context, java.util.concurrent.Executor, android.se.omapi.SEService.OnConnectedListener);
    method public android.se.omapi.Reader[] getReaders();
    method public java.lang.String getVersion();
    method public boolean isConnected();
    method public void shutdown();
  }
  public static abstract interface SEService.SecureElementListener {
    method public abstract void onServiceConnected();
  public static abstract interface SEService.OnConnectedListener {
    method public abstract void onConnected();
  }
  public class Session {
  public final class Session {
    method public void close();
    method public void closeChannels();
    method public byte[] getATR();
    method public android.se.omapi.Reader getReader();
    method public boolean isClosed();
    method public android.se.omapi.Channel openBasicChannel(byte[], byte) throws java.io.IOException;
    method public android.se.omapi.Channel openBasicChannel(byte[]) throws java.io.IOException;
    method public android.se.omapi.Channel openLogicalChannel(byte[], byte) throws java.io.IOException;
    method public android.se.omapi.Channel openLogicalChannel(byte[]) throws java.io.IOException;
  }
}
@@ -40955,7 +40957,7 @@ package android.telecom {
    method public final void putExtras(android.os.Bundle);
    method public final void removeExtras(java.util.List<java.lang.String>);
    method public final void removeExtras(java.lang.String...);
    method public void requestBluetoothAudio(java.lang.String);
    method public void requestBluetoothAudio(android.bluetooth.BluetoothDevice);
    method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
    method public final void sendRemoteRttRequest();
    method public final void sendRttInitiationFailure(int);
@@ -41166,7 +41168,7 @@ package android.telecom {
    method public void onCanAddCallChanged(boolean);
    method public void onConnectionEvent(android.telecom.Call, java.lang.String, android.os.Bundle);
    method public void onSilenceRinger();
    method public final void requestBluetoothAudio(java.lang.String);
    method public final void requestBluetoothAudio(android.bluetooth.BluetoothDevice);
    method public final void setAudioRoute(int);
    method public final void setMuted(boolean);
    field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.InCallService";
@@ -43376,6 +43378,7 @@ package android.text {
  public class PrecomputedText implements android.text.Spannable {
    method public char charAt(int);
    method public static android.text.PrecomputedText create(java.lang.CharSequence, android.text.PrecomputedText.Params);
    method public void getBounds(int, int, android.graphics.Rect);
    method public int getParagraphCount();
    method public int getParagraphEnd(int);
    method public int getParagraphStart(int);
@@ -43384,7 +43387,7 @@ package android.text {
    method public int getSpanFlags(java.lang.Object);
    method public int getSpanStart(java.lang.Object);
    method public <T> T[] getSpans(int, int, java.lang.Class<T>);
    method public java.lang.CharSequence getText();
    method public float getWidth(int, int);
    method public int length();
    method public int nextSpanTransition(int, int, java.lang.Class);
    method public void removeSpan(java.lang.Object);
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ sp<StatsLogProcessor> CreateStatsLogProcessor(const long timeBaseSec, const Stat
    sp<AlarmMonitor> periodicAlarmMonitor;
    sp<StatsLogProcessor> processor = new StatsLogProcessor(
        uidMap, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, [](const ConfigKey&){});
    processor->OnConfigUpdated(key, config);
    processor->OnConfigUpdated(0, key, config);
    return processor;
}

+3 −2
Original line number Diff line number Diff line
@@ -191,11 +191,12 @@ void StatsLogProcessor::OnLogEvent(LogEvent* event) {
    }
}

void StatsLogProcessor::OnConfigUpdated(const ConfigKey& key, const StatsdConfig& config) {
void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
                                        const StatsdConfig& config) {
    std::lock_guard<std::mutex> lock(mMetricsMutex);
    VLOG("Updated configuration for key %s", key.ToString().c_str());
    sp<MetricsManager> newMetricsManager =
        new MetricsManager(key, config, mTimeBaseSec, mUidMap,
        new MetricsManager(key, config, mTimeBaseSec, (timestampNs - 1) / NS_PER_SEC + 1, mUidMap,
                           mAnomalyAlarmMonitor, mPeriodicAlarmMonitor);

    if (newMetricsManager->isConfigValid()) {
+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@ public:

    void OnLogEvent(LogEvent* event);

    void OnConfigUpdated(const ConfigKey& key, const StatsdConfig& config);
    void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
                         const StatsdConfig& config);
    void OnConfigRemoved(const ConfigKey& key);

    size_t GetMetricsSize(const ConfigKey& key) const;
+15 −4
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ namespace android {
namespace os {
namespace statsd {

AlarmTracker::AlarmTracker(uint64_t startMillis,
AlarmTracker::AlarmTracker(const uint64_t startMillis,
                           const uint64_t currentMillis,
                           const Alarm& alarm, const ConfigKey& configKey,
                           const sp<AlarmMonitor>& alarmMonitor)
    : mAlarmConfig(alarm),
@@ -38,7 +39,11 @@ AlarmTracker::AlarmTracker(uint64_t startMillis,
      mAlarmMonitor(alarmMonitor) {
    VLOG("AlarmTracker() called");
    mAlarmSec = (startMillis + mAlarmConfig.offset_millis()) / MS_PER_SEC;
    // startMillis is the time statsd is created. We need to find the 1st alarm timestamp after
    // the config is added to statsd.
    mAlarmSec = findNextAlarmSec(currentMillis / MS_PER_SEC);  // round up
    mInternalAlarm = new InternalAlarm{static_cast<uint32_t>(mAlarmSec)};
    VLOG("AlarmTracker sets the periodic alarm at: %lld", (long long)mAlarmSec);
    if (mAlarmMonitor != nullptr) {
        mAlarmMonitor->add(mInternalAlarm);
    }
@@ -55,9 +60,13 @@ void AlarmTracker::addSubscription(const Subscription& subscription) {
    mSubscriptions.push_back(subscription);
}

uint64_t AlarmTracker::findNextAlarmSec(uint64_t currentTimeSec) {
    int periodsForward = (currentTimeSec - mAlarmSec) * MS_PER_SEC / mAlarmConfig.period_millis();
    return mAlarmSec + (periodsForward + 1) * mAlarmConfig.period_millis() / MS_PER_SEC;
int64_t AlarmTracker::findNextAlarmSec(int64_t currentTimeSec) {
    if (currentTimeSec <= mAlarmSec) {
        return mAlarmSec;
    }
    int64_t periodsForward =
        ((currentTimeSec - mAlarmSec) * MS_PER_SEC - 1) / mAlarmConfig.period_millis() + 1;
    return mAlarmSec + periodsForward * mAlarmConfig.period_millis() / MS_PER_SEC;
}

void AlarmTracker::informAlarmsFired(
@@ -68,12 +77,14 @@ void AlarmTracker::informAlarmsFired(
        return;
    }
    if (!mSubscriptions.empty()) {
        VLOG("AlarmTracker triggers the subscribers.");
        triggerSubscribers(mAlarmConfig.id(), DEFAULT_METRIC_DIMENSION_KEY, mConfigKey,
                           mSubscriptions);
    }
    firedAlarms.erase(mInternalAlarm);
    mAlarmSec = findNextAlarmSec((timestampNs-1) / NS_PER_SEC + 1); // round up
    mInternalAlarm = new InternalAlarm{static_cast<uint32_t>(mAlarmSec)};
    VLOG("AlarmTracker sets the periodic alarm at: %lld", (long long)mAlarmSec);
    if (mAlarmMonitor != nullptr) {
        mAlarmMonitor->add(mInternalAlarm);
    }
Loading