Loading cmds/dumpstate/dumpstate.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -2761,6 +2761,11 @@ static inline const char* ModeToString(Dumpstate::BugreportMode mode) { } } static bool IsConsentlessBugreportAllowed(const Dumpstate::DumpOptions& options) { // only BUGREPORT_TELEPHONY does not allow using consentless bugreport return !options.telephony_only; } static void SetOptionsFromMode(Dumpstate::BugreportMode mode, Dumpstate::DumpOptions* options, bool is_screenshot_requested) { // Modify com.android.shell.BugreportProgressService#isDefaultScreenshotRequired as well for Loading Loading @@ -3332,9 +3337,12 @@ void Dumpstate::MaybeCheckUserConsent(int32_t calling_uid, const std::string& ca android::String16 package(calling_package.c_str()); if (ics != nullptr) { MYLOGD("Checking user consent via incidentcompanion service\n"); int flags = 0x1; // IncidentManager.FLAG_CONFIRMATION_DIALOG if (IsConsentlessBugreportAllowed(*options_)) { flags |= 0x2; // IncidentManager.FLAG_ALLOW_CONSENTLESS_BUGREPORT } android::interface_cast<android::os::IIncidentCompanion>(ics)->authorizeReport( calling_uid, package, String16(), String16(), 0x1 /* FLAG_CONFIRMATION_DIALOG */, consent_callback_.get()); calling_uid, package, String16(), String16(), flags, consent_callback_.get()); } else { MYLOGD("Unable to check user consent; incidentcompanion service unavailable\n"); } Loading cmds/lshal/ListCommand.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -353,8 +353,16 @@ bool ListCommand::addEntryWithInstance(const TableEntry& entry, return false; } auto vintfFqInstance = vintf::FqInstance::from(fqInstance.string()); if (!vintfFqInstance.has_value()) { err() << "Unable to convert " << fqInstance.string() << " to vintf::FqInstance" << std::endl; return false; } std::string e; if (!manifest->insertInstance(fqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) { if (!manifest->insertInstance(*vintfFqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) { err() << "Warning: Cannot insert '" << fqInstance.string() << ": " << e << std::endl; return false; } Loading include/android/configuration.h +44 −0 Original line number Diff line number Diff line Loading @@ -470,11 +470,37 @@ enum { * and <a href="/guide/topics/resources/providing-resources.html#HDRQualifier">HDR</a> configurations. */ ACONFIGURATION_COLOR_MODE = 0x10000, /** * Bit mask for * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">grammatical gender</a> * configuration. */ ACONFIGURATION_GRAMMATICAL_GENDER = 0x20000, /** * Constant used to to represent MNC (Mobile Network Code) zero. * 0 cannot be used, since it is used to represent an undefined MNC. */ ACONFIGURATION_MNC_ZERO = 0xffff, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: not specified. */ ACONFIGURATION_GRAMMATICAL_GENDER_ANY = 0, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: neuter. */ ACONFIGURATION_GRAMMATICAL_GENDER_NEUTER = 1, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: feminine. */ ACONFIGURATION_GRAMMATICAL_GENDER_FEMININE = 2, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: masculine. */ ACONFIGURATION_GRAMMATICAL_GENDER_MASCULINE = 3, }; /** Loading Loading @@ -725,6 +751,24 @@ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_I */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); /** * Return the configuration's grammatical gender, or ACONFIGURATION_GRAMMATICAL_GENDER_ANY if * not set. * * Available since API level 34. */ int32_t AConfiguration_getGrammaticalGender(AConfiguration* config) __INTRODUCED_IN(__ANDROID_API_U__); /** * Set the configuration's grammatical gender to one of the * ACONFIGURATION_GRAMMATICAL_GENDER_* constants. * * Available since API level 34. */ void AConfiguration_setGrammaticalGender(AConfiguration* config, int32_t value) __INTRODUCED_IN(__ANDROID_API_U__); /** * Perform a diff between two configurations. Returns a bit mask of * ACONFIGURATION_* constants, each bit set meaning that configuration element Loading libs/binder/Android.bp +36 −16 Original line number Diff line number Diff line Loading @@ -195,18 +195,25 @@ cc_defaults { ], } cc_library_shared { name: "libbinder_on_trusty_mock", defaults: ["libbinder_common_defaults"], cc_library_headers { name: "trusty_mock_headers", host_supported: true, srcs: [ // Trusty-specific files "trusty/logging.cpp", "trusty/OS.cpp", "trusty/RpcServerTrusty.cpp", "trusty/RpcTransportTipcTrusty.cpp", "trusty/TrustyStatus.cpp", "trusty/socket.cpp", export_include_dirs: [ "trusty/include", "trusty/include_mock", ], visibility: [ ":__subpackages__", ], } cc_defaults { name: "trusty_mock_defaults", header_libs: [ "trusty_mock_headers", ], cflags: [ Loading @@ -227,16 +234,29 @@ cc_library_shared { ], rtti: false, local_include_dirs: [ "trusty/include", "trusty/include_mock", ], visibility: [ ":__subpackages__", ], } cc_library_shared { name: "libbinder_on_trusty_mock", defaults: [ "libbinder_common_defaults", "trusty_mock_defaults", ], srcs: [ // Trusty-specific files "trusty/logging.cpp", "trusty/OS.cpp", "trusty/RpcServerTrusty.cpp", "trusty/RpcTransportTipcTrusty.cpp", "trusty/TrustyStatus.cpp", "trusty/socket.cpp", ], } cc_defaults { name: "libbinder_kernel_defaults", srcs: [ Loading libs/binder/Binder.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -409,11 +409,9 @@ status_t BBinder::transact( Parcel emptyReply; timespec ts; timespec_get(&ts, TIME_UTC); auto transaction = android::binder::debug::RecordedTransaction::fromDetails(code, flags, ts, data, reply ? *reply : emptyReply, err); auto transaction = android::binder::debug::RecordedTransaction:: fromDetails(getInterfaceDescriptor(), code, flags, ts, data, reply ? *reply : emptyReply, err); if (transaction) { if (status_t err = transaction->dumpToFile(e->mRecordingFd); err != NO_ERROR) { LOG(INFO) << "Failed to dump RecordedTransaction to file with error " << err; Loading Loading
cmds/dumpstate/dumpstate.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -2761,6 +2761,11 @@ static inline const char* ModeToString(Dumpstate::BugreportMode mode) { } } static bool IsConsentlessBugreportAllowed(const Dumpstate::DumpOptions& options) { // only BUGREPORT_TELEPHONY does not allow using consentless bugreport return !options.telephony_only; } static void SetOptionsFromMode(Dumpstate::BugreportMode mode, Dumpstate::DumpOptions* options, bool is_screenshot_requested) { // Modify com.android.shell.BugreportProgressService#isDefaultScreenshotRequired as well for Loading Loading @@ -3332,9 +3337,12 @@ void Dumpstate::MaybeCheckUserConsent(int32_t calling_uid, const std::string& ca android::String16 package(calling_package.c_str()); if (ics != nullptr) { MYLOGD("Checking user consent via incidentcompanion service\n"); int flags = 0x1; // IncidentManager.FLAG_CONFIRMATION_DIALOG if (IsConsentlessBugreportAllowed(*options_)) { flags |= 0x2; // IncidentManager.FLAG_ALLOW_CONSENTLESS_BUGREPORT } android::interface_cast<android::os::IIncidentCompanion>(ics)->authorizeReport( calling_uid, package, String16(), String16(), 0x1 /* FLAG_CONFIRMATION_DIALOG */, consent_callback_.get()); calling_uid, package, String16(), String16(), flags, consent_callback_.get()); } else { MYLOGD("Unable to check user consent; incidentcompanion service unavailable\n"); } Loading
cmds/lshal/ListCommand.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -353,8 +353,16 @@ bool ListCommand::addEntryWithInstance(const TableEntry& entry, return false; } auto vintfFqInstance = vintf::FqInstance::from(fqInstance.string()); if (!vintfFqInstance.has_value()) { err() << "Unable to convert " << fqInstance.string() << " to vintf::FqInstance" << std::endl; return false; } std::string e; if (!manifest->insertInstance(fqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) { if (!manifest->insertInstance(*vintfFqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) { err() << "Warning: Cannot insert '" << fqInstance.string() << ": " << e << std::endl; return false; } Loading
include/android/configuration.h +44 −0 Original line number Diff line number Diff line Loading @@ -470,11 +470,37 @@ enum { * and <a href="/guide/topics/resources/providing-resources.html#HDRQualifier">HDR</a> configurations. */ ACONFIGURATION_COLOR_MODE = 0x10000, /** * Bit mask for * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">grammatical gender</a> * configuration. */ ACONFIGURATION_GRAMMATICAL_GENDER = 0x20000, /** * Constant used to to represent MNC (Mobile Network Code) zero. * 0 cannot be used, since it is used to represent an undefined MNC. */ ACONFIGURATION_MNC_ZERO = 0xffff, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: not specified. */ ACONFIGURATION_GRAMMATICAL_GENDER_ANY = 0, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: neuter. */ ACONFIGURATION_GRAMMATICAL_GENDER_NEUTER = 1, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: feminine. */ ACONFIGURATION_GRAMMATICAL_GENDER_FEMININE = 2, /** * <a href="/guide/topics/resources/providing-resources.html#GrammaticalInflectionQualifier">Grammatical gender</a>: masculine. */ ACONFIGURATION_GRAMMATICAL_GENDER_MASCULINE = 3, }; /** Loading Loading @@ -725,6 +751,24 @@ int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_I */ void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); /** * Return the configuration's grammatical gender, or ACONFIGURATION_GRAMMATICAL_GENDER_ANY if * not set. * * Available since API level 34. */ int32_t AConfiguration_getGrammaticalGender(AConfiguration* config) __INTRODUCED_IN(__ANDROID_API_U__); /** * Set the configuration's grammatical gender to one of the * ACONFIGURATION_GRAMMATICAL_GENDER_* constants. * * Available since API level 34. */ void AConfiguration_setGrammaticalGender(AConfiguration* config, int32_t value) __INTRODUCED_IN(__ANDROID_API_U__); /** * Perform a diff between two configurations. Returns a bit mask of * ACONFIGURATION_* constants, each bit set meaning that configuration element Loading
libs/binder/Android.bp +36 −16 Original line number Diff line number Diff line Loading @@ -195,18 +195,25 @@ cc_defaults { ], } cc_library_shared { name: "libbinder_on_trusty_mock", defaults: ["libbinder_common_defaults"], cc_library_headers { name: "trusty_mock_headers", host_supported: true, srcs: [ // Trusty-specific files "trusty/logging.cpp", "trusty/OS.cpp", "trusty/RpcServerTrusty.cpp", "trusty/RpcTransportTipcTrusty.cpp", "trusty/TrustyStatus.cpp", "trusty/socket.cpp", export_include_dirs: [ "trusty/include", "trusty/include_mock", ], visibility: [ ":__subpackages__", ], } cc_defaults { name: "trusty_mock_defaults", header_libs: [ "trusty_mock_headers", ], cflags: [ Loading @@ -227,16 +234,29 @@ cc_library_shared { ], rtti: false, local_include_dirs: [ "trusty/include", "trusty/include_mock", ], visibility: [ ":__subpackages__", ], } cc_library_shared { name: "libbinder_on_trusty_mock", defaults: [ "libbinder_common_defaults", "trusty_mock_defaults", ], srcs: [ // Trusty-specific files "trusty/logging.cpp", "trusty/OS.cpp", "trusty/RpcServerTrusty.cpp", "trusty/RpcTransportTipcTrusty.cpp", "trusty/TrustyStatus.cpp", "trusty/socket.cpp", ], } cc_defaults { name: "libbinder_kernel_defaults", srcs: [ Loading
libs/binder/Binder.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -409,11 +409,9 @@ status_t BBinder::transact( Parcel emptyReply; timespec ts; timespec_get(&ts, TIME_UTC); auto transaction = android::binder::debug::RecordedTransaction::fromDetails(code, flags, ts, data, reply ? *reply : emptyReply, err); auto transaction = android::binder::debug::RecordedTransaction:: fromDetails(getInterfaceDescriptor(), code, flags, ts, data, reply ? *reply : emptyReply, err); if (transaction) { if (status_t err = transaction->dumpToFile(e->mRecordingFd); err != NO_ERROR) { LOG(INFO) << "Failed to dump RecordedTransaction to file with error " << err; Loading