Loading include/ftl/flags.h +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public: } /* Tests whether any of the given flags are set */ bool any(Flags<F> f) const { return (mFlags & f.mFlags) != 0; } bool any(Flags<F> f = ~Flags<F>()) const { return (mFlags & f.mFlags) != 0; } /* Tests whether all of the given flags are set */ bool all(Flags<F> f) const { return (mFlags & f.mFlags) == f.mFlags; } Loading libs/dumputils/dump_utils.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -62,7 +62,10 @@ static const char* hidl_hal_interfaces_to_dump[] { "android.hardware.audio@7.0::IDevicesFactory", "android.hardware.automotive.audiocontrol@1.0::IAudioControl", "android.hardware.automotive.audiocontrol@2.0::IAudioControl", "android.hardware.automotive.can@1.0::ICanBus", "android.hardware.automotive.can@1.0::ICanController", "android.hardware.automotive.evs@1.0::IEvsCamera", "android.hardware.automotive.sv@1.0::ISurroundViewService", "android.hardware.automotive.vehicle@2.0::IVehicle", "android.hardware.biometrics.face@1.0::IBiometricsFace", "android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint", Loading @@ -87,7 +90,12 @@ static const char* hidl_hal_interfaces_to_dump[] { /* list of hal interface to dump containing process during native dumps */ static const std::vector<std::string> aidl_interfaces_to_dump { "android.hardware.automotive.audiocontrol.IAudioControl", "android.hardware.automotive.can.ICanController", "android.hardware.automotive.evs.IEvsEnumerator", "android.hardware.automotive.ivn.IIvnAndroidDevice", "android.hardware.automotive.occupant_awareness.IOccupantAwareness", "android.hardware.automotive.remoteaccess.IRemoteAccess", "android.hardware.automotive.vehicle.IVehicle", "android.hardware.biometrics.face.IBiometricsFace", "android.hardware.biometrics.fingerprint.IBiometricsFingerprint", "android.hardware.camera.provider.ICameraProvider", Loading libs/ftl/flags_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ TEST(Flags, Test) { TEST(Flags, Any) { Flags<TestFlags> flags = TestFlags::ONE | TestFlags::TWO; ASSERT_TRUE(flags.any()); ASSERT_TRUE(flags.any(TestFlags::ONE)); ASSERT_TRUE(flags.any(TestFlags::TWO)); ASSERT_FALSE(flags.any(TestFlags::THREE)); Loading @@ -42,6 +43,9 @@ TEST(Flags, Any) { ASSERT_TRUE(flags.any(TestFlags::TWO | TestFlags::THREE)); ASSERT_TRUE(flags.any(TestFlags::ONE | TestFlags::THREE)); ASSERT_TRUE(flags.any(TestFlags::ONE | TestFlags::TWO | TestFlags::THREE)); Flags<TestFlags> emptyFlags; ASSERT_FALSE(emptyFlags.any()); } TEST(Flags, All) { Loading libs/input/KeyCharacterMap.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -1050,14 +1050,14 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { return finishKey(*key); } Vector<Property> properties; std::vector<Property> properties; // Parse all comma-delimited property names up to the first colon. for (;;) { if (token == "label") { properties.add(Property(PROPERTY_LABEL)); properties.emplace_back(PROPERTY_LABEL); } else if (token == "number") { properties.add(Property(PROPERTY_NUMBER)); properties.emplace_back(PROPERTY_NUMBER); } else { int32_t metaState; status_t status = parseModifier(token.string(), &metaState); Loading @@ -1066,7 +1066,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { mTokenizer->getLocation().string(), token.string()); return status; } properties.add(Property(PROPERTY_META, metaState)); properties.emplace_back(PROPERTY_META, metaState); } mTokenizer->skipDelimiters(WHITESPACE); Loading Loading @@ -1181,8 +1181,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { } while (!mTokenizer->isEol() && mTokenizer->peekChar() != '#'); // Add the behavior. for (size_t i = 0; i < properties.size(); i++) { const Property& property = properties.itemAt(i); for (const Property& property : properties) { switch (property.property) { case PROPERTY_LABEL: if (key->label) { Loading services/automotive/display/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,4 @@ cc_binary { vintf_fragments: [ "manifest_android.frameworks.automotive.display@1.0.xml", ], system_ext_specific: true, } Loading
include/ftl/flags.h +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ public: } /* Tests whether any of the given flags are set */ bool any(Flags<F> f) const { return (mFlags & f.mFlags) != 0; } bool any(Flags<F> f = ~Flags<F>()) const { return (mFlags & f.mFlags) != 0; } /* Tests whether all of the given flags are set */ bool all(Flags<F> f) const { return (mFlags & f.mFlags) == f.mFlags; } Loading
libs/dumputils/dump_utils.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -62,7 +62,10 @@ static const char* hidl_hal_interfaces_to_dump[] { "android.hardware.audio@7.0::IDevicesFactory", "android.hardware.automotive.audiocontrol@1.0::IAudioControl", "android.hardware.automotive.audiocontrol@2.0::IAudioControl", "android.hardware.automotive.can@1.0::ICanBus", "android.hardware.automotive.can@1.0::ICanController", "android.hardware.automotive.evs@1.0::IEvsCamera", "android.hardware.automotive.sv@1.0::ISurroundViewService", "android.hardware.automotive.vehicle@2.0::IVehicle", "android.hardware.biometrics.face@1.0::IBiometricsFace", "android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint", Loading @@ -87,7 +90,12 @@ static const char* hidl_hal_interfaces_to_dump[] { /* list of hal interface to dump containing process during native dumps */ static const std::vector<std::string> aidl_interfaces_to_dump { "android.hardware.automotive.audiocontrol.IAudioControl", "android.hardware.automotive.can.ICanController", "android.hardware.automotive.evs.IEvsEnumerator", "android.hardware.automotive.ivn.IIvnAndroidDevice", "android.hardware.automotive.occupant_awareness.IOccupantAwareness", "android.hardware.automotive.remoteaccess.IRemoteAccess", "android.hardware.automotive.vehicle.IVehicle", "android.hardware.biometrics.face.IBiometricsFace", "android.hardware.biometrics.fingerprint.IBiometricsFingerprint", "android.hardware.camera.provider.ICameraProvider", Loading
libs/ftl/flags_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ TEST(Flags, Test) { TEST(Flags, Any) { Flags<TestFlags> flags = TestFlags::ONE | TestFlags::TWO; ASSERT_TRUE(flags.any()); ASSERT_TRUE(flags.any(TestFlags::ONE)); ASSERT_TRUE(flags.any(TestFlags::TWO)); ASSERT_FALSE(flags.any(TestFlags::THREE)); Loading @@ -42,6 +43,9 @@ TEST(Flags, Any) { ASSERT_TRUE(flags.any(TestFlags::TWO | TestFlags::THREE)); ASSERT_TRUE(flags.any(TestFlags::ONE | TestFlags::THREE)); ASSERT_TRUE(flags.any(TestFlags::ONE | TestFlags::TWO | TestFlags::THREE)); Flags<TestFlags> emptyFlags; ASSERT_FALSE(emptyFlags.any()); } TEST(Flags, All) { Loading
libs/input/KeyCharacterMap.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -1050,14 +1050,14 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { return finishKey(*key); } Vector<Property> properties; std::vector<Property> properties; // Parse all comma-delimited property names up to the first colon. for (;;) { if (token == "label") { properties.add(Property(PROPERTY_LABEL)); properties.emplace_back(PROPERTY_LABEL); } else if (token == "number") { properties.add(Property(PROPERTY_NUMBER)); properties.emplace_back(PROPERTY_NUMBER); } else { int32_t metaState; status_t status = parseModifier(token.string(), &metaState); Loading @@ -1066,7 +1066,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { mTokenizer->getLocation().string(), token.string()); return status; } properties.add(Property(PROPERTY_META, metaState)); properties.emplace_back(PROPERTY_META, metaState); } mTokenizer->skipDelimiters(WHITESPACE); Loading Loading @@ -1181,8 +1181,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { } while (!mTokenizer->isEol() && mTokenizer->peekChar() != '#'); // Add the behavior. for (size_t i = 0; i < properties.size(); i++) { const Property& property = properties.itemAt(i); for (const Property& property : properties) { switch (property.property) { case PROPERTY_LABEL: if (key->label) { Loading
services/automotive/display/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,4 @@ cc_binary { vintf_fragments: [ "manifest_android.frameworks.automotive.display@1.0.xml", ], system_ext_specific: true, }