Loading api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29701,7 +29701,6 @@ package android.preference { method protected void onClick(); method protected android.view.View onCreateView(android.view.ViewGroup); method public void onDependencyChanged(android.preference.Preference, boolean); method protected void onDetachedFromActivity(); method protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray, int); method public void onParentChanged(android.preference.Preference, boolean); method protected void onPrepareForRemoval(); api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -32005,7 +32005,6 @@ package android.preference { method protected void onClick(); method protected android.view.View onCreateView(android.view.ViewGroup); method public void onDependencyChanged(android.preference.Preference, boolean); method protected void onDetachedFromActivity(); method protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray, int); method public void onParentChanged(android.preference.Preference, boolean); method protected void onPrepareForRemoval(); core/java/android/preference/Preference.java +3 −14 Original line number Diff line number Diff line Loading @@ -1184,10 +1184,9 @@ public class Preference implements Comparable<Preference> { /** * Called when the Preference hierarchy has been attached to the * {@link PreferenceActivity} or {@link PreferenceFragment}. This can * also be called when this Preference has been attached to a group * that was already attached to the {@link PreferenceActivity} or * {@link PreferenceFragment}. * {@link PreferenceActivity}. This can also be called when this * Preference has been attached to a group that was already attached * to the {@link PreferenceActivity}. */ protected void onAttachedToActivity() { // At this point, the hierarchy that this preference is in is connected Loading @@ -1195,16 +1194,6 @@ public class Preference implements Comparable<Preference> { registerDependency(); } /** * Called when the Preference hierarchy has been detached from the * {@link PreferenceActivity} or {@link PreferenceFragment}. This can * also be called when this Preference has been removed from a group * that was already attached to the {@link PreferenceActivity} or * {@link PreferenceFragment}. */ protected void onDetachedFromActivity() { } private void registerDependency() { if (TextUtils.isEmpty(mDependencyKey)) return; Loading core/java/android/preference/PreferenceGroup.java +5 −15 Original line number Diff line number Diff line Loading @@ -186,11 +186,7 @@ public abstract class PreferenceGroup extends Preference implements GenericInfla private boolean removePreferenceInt(Preference preference) { synchronized(this) { preference.onPrepareForRemoval(); boolean success = mPreferenceList.remove(preference); if (mAttachedToActivity) { preference.onDetachedFromActivity(); } return success; return mPreferenceList.remove(preference); } } Loading Loading @@ -283,17 +279,11 @@ public abstract class PreferenceGroup extends Preference implements GenericInfla } @Override protected void onDetachedFromActivity() { super.onDetachedFromActivity(); protected void onPrepareForRemoval() { super.onPrepareForRemoval(); // We won't be attached to the activity anymore mAttachedToActivity = false; // Dispatch to all contained preferences final int preferenceCount = getPreferenceCount(); for (int i = 0; i < preferenceCount; i++) { getPreference(i).onDetachedFromActivity(); } } @Override Loading core/java/android/preference/PreferenceManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -519,9 +519,6 @@ public class PreferenceManager { */ boolean setPreferences(PreferenceScreen preferenceScreen) { if (preferenceScreen != mPreferenceScreen) { if (mPreferenceScreen != null) { mPreferenceScreen.onDetachedFromActivity(); } mPreferenceScreen = preferenceScreen; return true; } Loading Loading @@ -831,10 +828,6 @@ public class PreferenceManager { void dispatchActivityDestroy() { List<OnActivityDestroyListener> list = null; if (mPreferenceScreen != null) { mPreferenceScreen.onDetachedFromActivity(); mPreferenceScreen = null; } synchronized (this) { if (mActivityDestroyListeners != null) { list = new ArrayList<OnActivityDestroyListener>(mActivityDestroyListeners); Loading Loading
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29701,7 +29701,6 @@ package android.preference { method protected void onClick(); method protected android.view.View onCreateView(android.view.ViewGroup); method public void onDependencyChanged(android.preference.Preference, boolean); method protected void onDetachedFromActivity(); method protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray, int); method public void onParentChanged(android.preference.Preference, boolean); method protected void onPrepareForRemoval();
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -32005,7 +32005,6 @@ package android.preference { method protected void onClick(); method protected android.view.View onCreateView(android.view.ViewGroup); method public void onDependencyChanged(android.preference.Preference, boolean); method protected void onDetachedFromActivity(); method protected java.lang.Object onGetDefaultValue(android.content.res.TypedArray, int); method public void onParentChanged(android.preference.Preference, boolean); method protected void onPrepareForRemoval();
core/java/android/preference/Preference.java +3 −14 Original line number Diff line number Diff line Loading @@ -1184,10 +1184,9 @@ public class Preference implements Comparable<Preference> { /** * Called when the Preference hierarchy has been attached to the * {@link PreferenceActivity} or {@link PreferenceFragment}. This can * also be called when this Preference has been attached to a group * that was already attached to the {@link PreferenceActivity} or * {@link PreferenceFragment}. * {@link PreferenceActivity}. This can also be called when this * Preference has been attached to a group that was already attached * to the {@link PreferenceActivity}. */ protected void onAttachedToActivity() { // At this point, the hierarchy that this preference is in is connected Loading @@ -1195,16 +1194,6 @@ public class Preference implements Comparable<Preference> { registerDependency(); } /** * Called when the Preference hierarchy has been detached from the * {@link PreferenceActivity} or {@link PreferenceFragment}. This can * also be called when this Preference has been removed from a group * that was already attached to the {@link PreferenceActivity} or * {@link PreferenceFragment}. */ protected void onDetachedFromActivity() { } private void registerDependency() { if (TextUtils.isEmpty(mDependencyKey)) return; Loading
core/java/android/preference/PreferenceGroup.java +5 −15 Original line number Diff line number Diff line Loading @@ -186,11 +186,7 @@ public abstract class PreferenceGroup extends Preference implements GenericInfla private boolean removePreferenceInt(Preference preference) { synchronized(this) { preference.onPrepareForRemoval(); boolean success = mPreferenceList.remove(preference); if (mAttachedToActivity) { preference.onDetachedFromActivity(); } return success; return mPreferenceList.remove(preference); } } Loading Loading @@ -283,17 +279,11 @@ public abstract class PreferenceGroup extends Preference implements GenericInfla } @Override protected void onDetachedFromActivity() { super.onDetachedFromActivity(); protected void onPrepareForRemoval() { super.onPrepareForRemoval(); // We won't be attached to the activity anymore mAttachedToActivity = false; // Dispatch to all contained preferences final int preferenceCount = getPreferenceCount(); for (int i = 0; i < preferenceCount; i++) { getPreference(i).onDetachedFromActivity(); } } @Override Loading
core/java/android/preference/PreferenceManager.java +1 −8 Original line number Diff line number Diff line Loading @@ -519,9 +519,6 @@ public class PreferenceManager { */ boolean setPreferences(PreferenceScreen preferenceScreen) { if (preferenceScreen != mPreferenceScreen) { if (mPreferenceScreen != null) { mPreferenceScreen.onDetachedFromActivity(); } mPreferenceScreen = preferenceScreen; return true; } Loading Loading @@ -831,10 +828,6 @@ public class PreferenceManager { void dispatchActivityDestroy() { List<OnActivityDestroyListener> list = null; if (mPreferenceScreen != null) { mPreferenceScreen.onDetachedFromActivity(); mPreferenceScreen = null; } synchronized (this) { if (mActivityDestroyListeners != null) { list = new ArrayList<OnActivityDestroyListener>(mActivityDestroyListeners); Loading