title: A resource was acquired at attached stack trace but never released after start splash screen using jeremyfeinstein
body: <p>currently I need to create an application of wallpaper. I need to start a splash screen before enter into main screen. my main screen is developed using reference from slidingmenu. However, after start splash screen, I have got error below: Please advise and help. Thank you !!</p>
  
  <p>Error after start a fragment activity after run splash screen</p>
  
  <pre><code>    E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
     java.lang.Throwable: Explicit termination method 'end' not called
                at dalvik.system.CloseGuard.open(CloseGuard.java:184)
                at java.util.zip.Inflater.&lt;init&gt;(Inflater.java:82)
                at com.android.okio.GzipSource.&lt;init&gt;(GzipSource.java:57)
  </code></pre>
  
  <p>Splash Screen activity</p>
  
  <pre><code>public class SplashScreen extends SherlockActivity {
      // Splash screen timer
      private static int SPLASH_TIME_OUT = 2000;
  
      @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_splash);
  
      new Handler().postDelayed(new Runnable() {
  
          /*
           * Showing splash screen with a timer. This will be useful when you
           * want to show case your app logo / company
           */
  
          @Override
          public void run() {
              // This method will be executed once the timer is over
              // Start your app main activity
              Intent i = new Intent(SplashScreen.this, FragmentChangeActivity.class);
              startActivity(i);
  
              // close this activity
              finish();
          }
      }, SPLASH_TIME_OUT);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Fragment Activity</p>
  
  <pre><code>public class FragmentChangeActivity extends MainActivity {
  
      private Fragment mContent;
  
  public FragmentChangeActivity() {
      super(R.string.changing_fragments);
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // set the Above View
      if (savedInstanceState != null)
          mContent = getSupportFragmentManager().getFragment(savedInstanceState, "mContent");
      if (mContent == null)
          mContent = new ColorFragment(R.color.red);
  
      // set the Above View
      setContentView(R.layout.content_frame);
      getSupportFragmentManager()
              .beginTransaction()
              .replace(R.id.content_frame, mContent)
              .commit();
  
      // set the Behind View
      setBehindContentView(R.layout.menu_frame);
      getSupportFragmentManager()
              .beginTransaction()
              .replace(R.id.menu_frame, new ColorMenuFragment())
              .commit();
  
      // customize the SlidingMenu
      getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
  }
  
  @Override
  public void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      getSupportFragmentManager().putFragment(outState, "mContent", mContent);
  }
  
  public void switchContent(Fragment fragment) {
      mContent = fragment;
      getSupportFragmentManager()
              .beginTransaction()
              .replace(R.id.content_frame, fragment)
              .commit();
      getSlidingMenu().showContent();
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
          case R.id.share:
              new AlertDialog.Builder(this)
                      .setTitle(R.string.share)
                      .setMessage(Html.fromHtml(getString(R.string.apache_license)))
                      .show();
              break;
          case R.id.info:
              new AlertDialog.Builder(this)
                      .setTitle(R.string.info)
                      .setMessage(Html.fromHtml(getString(R.string.about_msg)))
                      .show();
              break;
      }
      return super.onOptionsItemSelected(item);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getSupportMenuInflater().inflate(R.menu.example_list, menu);
      return true;
  }
  }
  </code></pre>