title: Remove orientation restricitons programmatically
body: <p>In my manifest I've setup an activity restricted to portrait orientation. But I need to remove this restriction on condition. So, how do I achieve removing orientation restrictions programmatically ?</p>
  
  <p>upd: my present settings are:</p>
  
  <pre><code>    &lt;activity
          android:name=".activity.MainActivity"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.NoTitleBar"
          android:screenOrientation="portrait"
          android:configChanges="orientation"&gt;
  
  
   /**
   * Defines whether the device being used is a tablet and if so adds horizontal orientation option.
   */
       protected void _updateScreenOrientationModes(){
           if(((MyApplication) getApplication())._isTablet == true)
                  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
           }
  </code></pre>