title: Restart singleTask Activity
body: <p>i write launcher activity that have option to show or hide wallpaper to do that i use two theme </p>
  
  <blockquote>
    <p>android:Theme.Holo.Light.NoActionBar</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>android:Theme.Wallpaper.NoTitleBar</p>
  </blockquote>
  
  <p>to change it i do </p>
  
  <pre><code>@Override
  protected void onNewIntent(final Intent intent) {
      super.onNewIntent(intent);
      Utils.PrintInfo("MainActivity.onNewIntent");
  
  
      if (AppSettings.Data.WallpaperThemeChanged) {
          AppSettings.Data.WallpaperThemeChanged = false;
  
  
          startActivity(new Intent(this, ThemeReloadActivity.class));
  
          finish();
          return;
      }
  }
  </code></pre>
  
  <p>with <code>ThemeReloadActivity</code> like this</p>
  
  <pre><code>public class ThemeReloadActivity extends Activity {
  
  @Override
  protected void onResume() {
  
      Utils.PrintError("ThemeReloadActivity.onCreate");
  
      Activity activity = MainActivity.getMainActivity();
      activity.finish();
      startActivity(new Intent(activity, activity.getClass()));
      super.onResume();
  }
  }
  </code></pre>
  
  <p>and this is my Manifest fragment for that activity</p>
  
  <pre><code>&lt;activity
          android:name="com.maxcom.launcher.MainActivity"
          android:clearTaskOnLaunch="true"
          android:label="@string/app_name"
          android:launchMode="singleTask"
          android:screenOrientation="portrait"
          android:stateNotNeeded="true" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;category android:name="android.intent.category.HOME" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>but sometimes if i spam home theme does not change, it looks like app does not restart at all</p>