// ART counterpart of the compat framework (go/compat-framework). // Created in order to avoid repeated up-calls to Java. class CompatFramework { public: // Compat change reported state // This must be kept in sync with AppCompatibilityChangeReported.State in // frameworks/proto_logging/stats/atoms.proto enumclass ChangeState {
kUnknown,
kEnabled,
kDisabled,
kLogged
};
const std::set<uint64_t>& GetDisabledCompatChanges() const { return disabled_compat_changes_;
} // Query if a given compatibility change is enabled for the current process. // This also gets logged to logcat, and we add the information we logged in // reported_compat_changes_. This ensures we only log once per change id for the app's lifetime. bool IsChangeEnabled(uint64_t change_id);
// Logs that the code path for this compatibility change has been reached. // This also gets logged to logcat, and we add the information we logged in // reported_compat_changes_. This ensures we only log once per change id for the app's lifetime. void LogChange(uint64_t change_id);
private: // Get a string equivalent for a compatibility change state. static std::string_view ChangeStateToString(ChangeState s); // Report the state of a compatibility change to logcat. // TODO(145743810): also report to statsd. void ReportChange(uint64_t change_id, ChangeState state);
// A set of disabled compat changes for the running app, all other changes are enabled.
std::set<uint64_t> disabled_compat_changes_;
// A set of reported compat changes for the running app.
std::set<uint64_t> reported_compat_changes_ GUARDED_BY(reported_compat_changes_lock_);
Mutex reported_compat_changes_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
};
} // namespace art
#endif// ART_RUNTIME_COMPAT_FRAMEWORK_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.