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

Commit 6c463d24 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Support profileable application action" into qt-dev am: 7cefe09e

am: dca6b774

Change-Id: Ib9a4990578a6727413842ff2b4ea58fc3d0873bf
parents 37842434 dca6b774
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -367,6 +367,7 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor,

  application_action["uses-library"].Action(RequiredNameIsNotEmpty);
  application_action["library"].Action(RequiredNameIsNotEmpty);
  application_action["profileable"];

  xml::XmlNodeAction& static_library_action = application_action["static-library"];
  static_library_action.Action(RequiredNameIsJavaPackage);
+18 −0
Original line number Diff line number Diff line
@@ -671,6 +671,24 @@ TEST_F(ManifestFixerTest, ApplicationInjectDebuggable) {
      {}, "application", xml::kSchemaAndroid, "debuggable", "true"), NotNull());
}

TEST_F(ManifestFixerTest, ApplicationProfileable) {
  std::string shell = R"(
      <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="android">
        <application>
          <profileable android:shell="true"/>
        </application>
      </manifest>)";
  EXPECT_THAT(Verify(shell), NotNull());
  std::string noshell = R"(
      <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="android">
        <application>
          <profileable/>
        </application>
      </manifest>)";
  EXPECT_THAT(Verify(noshell), NotNull());
}

TEST_F(ManifestFixerTest, IgnoreNamespacedElements) {
  std::string input = R"EOF(