diff options
Diffstat (limited to 'java/com/android/incallui/baseui')
-rw-r--r-- | java/com/android/incallui/baseui/BaseFragment.java | 14 | ||||
-rw-r--r-- | java/com/android/incallui/baseui/Presenter.java | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/java/com/android/incallui/baseui/BaseFragment.java b/java/com/android/incallui/baseui/BaseFragment.java index 58b8c6f8d..c1b614899 100644 --- a/java/com/android/incallui/baseui/BaseFragment.java +++ b/java/com/android/incallui/baseui/BaseFragment.java @@ -24,10 +24,10 @@ public abstract class BaseFragment<T extends Presenter<U>, U extends Ui> extends private static final String KEY_FRAGMENT_HIDDEN = "key_fragment_hidden"; - private T mPresenter; + private T presenter; protected BaseFragment() { - mPresenter = createPresenter(); + presenter = createPresenter(); } public abstract T createPresenter(); @@ -40,20 +40,20 @@ public abstract class BaseFragment<T extends Presenter<U>, U extends Ui> extends * @return The presenter associated with this fragment. */ public T getPresenter() { - return mPresenter; + return presenter; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - mPresenter.onUiReady(getUi()); + presenter.onUiReady(getUi()); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { - mPresenter.onRestoreInstanceState(savedInstanceState); + presenter.onRestoreInstanceState(savedInstanceState); if (savedInstanceState.getBoolean(KEY_FRAGMENT_HIDDEN)) { getFragmentManager().beginTransaction().hide(this).commit(); } @@ -63,13 +63,13 @@ public abstract class BaseFragment<T extends Presenter<U>, U extends Ui> extends @Override public void onDestroyView() { super.onDestroyView(); - mPresenter.onUiDestroy(getUi()); + presenter.onUiDestroy(getUi()); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); - mPresenter.onSaveInstanceState(outState); + presenter.onSaveInstanceState(outState); outState.putBoolean(KEY_FRAGMENT_HIDDEN, isHidden()); } } diff --git a/java/com/android/incallui/baseui/Presenter.java b/java/com/android/incallui/baseui/Presenter.java index 581ad47c7..e4df9382f 100644 --- a/java/com/android/incallui/baseui/Presenter.java +++ b/java/com/android/incallui/baseui/Presenter.java @@ -21,7 +21,7 @@ import android.os.Bundle; /** Base class for Presenters. */ public abstract class Presenter<U extends Ui> { - private U mUi; + private U ui; /** * Called after the UI view has been created. That is when fragment.onViewCreated() is called. @@ -29,13 +29,13 @@ public abstract class Presenter<U extends Ui> { * @param ui The Ui implementation that is now ready to be used. */ public void onUiReady(U ui) { - mUi = ui; + this.ui = ui; } /** Called when the UI view is destroyed in Fragment.onDestroyView(). */ public final void onUiDestroy(U ui) { onUiUnready(ui); - mUi = null; + this.ui = null; } /** @@ -49,6 +49,6 @@ public abstract class Presenter<U extends Ui> { public void onRestoreInstanceState(Bundle savedInstanceState) {} public U getUi() { - return mUi; + return ui; } } |