title: Why the getApplication() from Service Class on android can still return its sub class obj?
body: <p>As the title,</p>
  
  <p>I've seen the code below in a custom service class of KiahApplication to acquire app's Application obj:</p>
  
  <p><code>((KiahApplication)super.getApplication()).setServiceRunning(true);</code></p>
  
  <p>But how could <code>android.app.Service</code> class's getApplication method know &amp; return my custom Application obj?</p>
  
  <p><code>android.app.Service</code> should not be a part of my custom application,</p>
  
  <p>and it's not recorded in the Application's manifest file which should be the definition of the App's members.</p>
  
  <p>Thank you so much for helping!</p>