Different behaviour of @Override in OnPreferenceChangeListener.onPreferenceChange method of Android 2.2 application depending on source code level
<p>I'm developing Android 2.2 application and I'm going to use <em>Preference.OnPreferenceChangeListener</em> interface.</p>

<p>I've added the following piece of code to my preference activity:</p>

<pre><code>Preference somePref = findPreference(SOME_PREF);
    somePref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {

                @Override
                public boolean onPreferenceChange(Preference preference,
                        Object newValue) {
                    // some code here
                    return true;
                }
            });
</code></pre>

<p>If I use 1.6 Java compiler with 1.6 source code level, then everything is perfectly fine. But if I change the level of source code to 1.5 then I've got an error message:</p>

<blockquote>
  <p>The method onPreferenceChange(Preference, Object) of type new Preference.OnPreferenceChangeListener(){} must override a superclass method</p>
</blockquote>

<p>The question is: why?</p>
