title: Is there any way to prevent/protect a method from breaking during a configuration change?
body: <p>Say:</p>
  <pre><code>public class MainActivity extends AppCompatActivity {
  
    ...
  
    public void doingSomething() {
    ...
    ...
    //the configuration change occurs here
    ...
    ...
    }
  
  ...
  
  }
  </code></pre>
  <p>I need to protect the method above from breaking due to a configuration change.</p>