title: Android manifest merging: removing LAUNCHER intent-filter doesn't take effect
body: <p>In my android app I use a library project and I use one of it's activities. However in the library project that activity has MAIN action and LAUNCHER category intent-filter. So I added that activity to my manifest and removed the intent-filter. The manifests seem to be correctly merged into build/intermediates/manifests/full/debug/AndroidManifest.xml, and the activity looks as expected (without the intent-filter):</p>
  
  <pre><code>    &lt;activity
          android:name="com.michaelrnovak.util.logger.Logger"
          android:configChanges="orientation"
          android:label="@string/show_log" &gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>However when I start the app from AndroidStudio in the emulator, then instead of my AlertsActivity, the library's Logger activity is launched. What am I doing wrong?</p>
  
  <p>This is the manifest of the library:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.michaelrnovak.util.logger"
        android:versionCode="8"
        android:versionName="1.5"&gt;
      &lt;uses-permission android:name="android.permission.READ_LOGS" /&gt;
      &lt;application
          android:icon="@drawable/icon"
          android:label="@string/app_name"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".Logger"
                    android:label="@string/app_name"
                    android:configChanges="orientation"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
      &lt;uses-sdk android:minSdkVersion="7" /&gt;
  &lt;/manifest&gt; 
  </code></pre>
  
  <p>and my app's manifest has the following relevant activity definitions:</p>
  
  <pre><code>    &lt;activity
          android:name=".AlertsActivity"
          android:configChanges="orientation|keyboardHidden|screenSize"
          android:label="@string/app_name"
          android:launchMode="singleTop" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name="com.michaelrnovak.util.logger.Logger"
          android:label="@string/show_log"
          android:configChanges="orientation"
          tools:replace="android:label"
          &gt;
          &lt;intent-filter tools:node="removeAll" /&gt;
      &lt;/activity&gt;
  </code></pre>