Package 

Class Shell.Initializer


  • 
    public class Shell.Initializer
    
                        

    The initializer when a new {@code Shell} is constructed.

    This is an advanced feature. If you need to run specific operations when a new {@code Shell} is constructed, extend this class, add your own implementation, and register it with setInitializers.The concept is similar to {@code .bashrc}: run specific scripts/commands when the shellstarts up. onInit will be called as soon as the shell isconstructed and tested as a valid shell.

    An initializer will be constructed and the callbacks will be invoked each time a newshell is created.

    • Method Summary

      Modifier and Type Method Description
      boolean onInit(@NonNull() Context context, @NonNull() Shell shell) Called when a new shell is constructed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onInit

         boolean onInit(@NonNull() Context context, @NonNull() Shell shell)

        Called when a new shell is constructed.

        Parameters:
        context - the application context.
        shell - the newly constructed shell.