Change ViewController#initInternal to #onInit
Bug: 171472009 Test: manual Change-Id: Iddc6c0240486b0d3005216bba0c40bfb481b94b3
This commit is contained in:
@@ -81,7 +81,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
|
||||
abstract void resetState();
|
||||
|
||||
@Override
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mMessageAreaController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
||||
* Attach the controller to the view it relates to.
|
||||
*/
|
||||
@Override
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mKeyguardSliceViewController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>
|
||||
}
|
||||
|
||||
/** Initialize the Controller. */
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mKeyguardSecurityContainerController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -190,8 +190,8 @@ public class KeyguardPatternViewController
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initInternal() {
|
||||
super.initInternal();
|
||||
public void onInit() {
|
||||
super.onInit();
|
||||
mMessageAreaController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mSecurityViewFlipperController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mKeyguardClockSwitchController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class QSContainerImplController extends ViewController<QSContainerImpl> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initInternal() {
|
||||
public void onInit() {
|
||||
mQuickStatusBarHeaderController.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import android.view.View.OnAttachStateChangeListener;
|
||||
*
|
||||
* Implementations should handle setup and teardown related activities inside of
|
||||
* {@link #onViewAttached()} and {@link #onViewDetached()}. Be sure to call {@link #init()} on
|
||||
* any child controllers that this uses. This can be done in {@link #initInternal()} if the
|
||||
* any child controllers that this uses. This can be done in {@link #onInit()} if the
|
||||
* controllers are injected, or right after creation time of the child controller.
|
||||
*
|
||||
* Tip: View "attachment" happens top down - parents are notified that they are attached before
|
||||
@@ -66,14 +66,14 @@ public abstract class ViewController<T extends View> {
|
||||
* Call immediately after constructing Controller in order to handle view lifecycle events.
|
||||
*
|
||||
* Generally speaking, you don't want to override this method. Instead, override
|
||||
* {@link #initInternal()} as a way to have an run-once idempotent method that you can use for
|
||||
* {@link #onInit()} as a way to have an run-once idempotent method that you can use for
|
||||
* setup of your ViewController.
|
||||
*/
|
||||
public void init() {
|
||||
if (mInited) {
|
||||
return;
|
||||
}
|
||||
initInternal();
|
||||
onInit();
|
||||
mInited = true;
|
||||
|
||||
if (mView != null) {
|
||||
@@ -90,7 +90,7 @@ public abstract class ViewController<T extends View> {
|
||||
* Override this to perform idempotent, one-time setup that your controller needs. It will
|
||||
* be called before {@link #onViewAttached()}.
|
||||
*/
|
||||
protected void initInternal() {}
|
||||
protected void onInit() {}
|
||||
|
||||
protected Context getContext() {
|
||||
return mView.getContext();
|
||||
|
||||
Reference in New Issue
Block a user