Search in sources :

Example 1 with CallSuper

use of android.annotation.CallSuper in project platform_frameworks_base by android.

the class AndroidKeyStoreSignatureSpiBase method resetWhilePreservingInitState.

/**
     * Resets this cipher while preserving the initialized state. This must be equivalent to
     * rolling back the cipher's state to just after the most recent {@code engineInit} completed
     * successfully.
     *
     * <p>Subclasses storing additional post-init state should override this method, reset the
     * additional state, and then chain to superclass.
     */
@CallSuper
protected void resetWhilePreservingInitState() {
    IBinder operationToken = mOperationToken;
    if (operationToken != null) {
        mOperationToken = null;
        mKeyStore.abort(operationToken);
    }
    mOperationHandle = 0;
    mMessageStreamer = null;
    mCachedException = null;
}
Also used : IBinder(android.os.IBinder) CallSuper(android.annotation.CallSuper)

Example 2 with CallSuper

use of android.annotation.CallSuper in project platform_frameworks_base by android.

the class AndroidKeyStoreSignatureSpiBase method resetAll.

/**
     * Resets this cipher to its pristine pre-init state. This must be equivalent to obtaining a new
     * cipher instance.
     *
     * <p>Subclasses storing additional state should override this method, reset the additional
     * state, and then chain to superclass.
     */
@CallSuper
protected void resetAll() {
    IBinder operationToken = mOperationToken;
    if (operationToken != null) {
        mOperationToken = null;
        mKeyStore.abort(operationToken);
    }
    mSigning = false;
    mKey = null;
    appRandom = null;
    mOperationToken = null;
    mOperationHandle = 0;
    mMessageStreamer = null;
    mCachedException = null;
}
Also used : IBinder(android.os.IBinder) CallSuper(android.annotation.CallSuper)

Example 3 with CallSuper

use of android.annotation.CallSuper in project platform_frameworks_base by android.

the class Activity method onPostResume.

/**
     * Called when activity resume is complete (after {@link #onResume} has
     * been called). Applications will generally not implement this method;
     * it is intended for system classes to do final setup after application
     * resume code has run.
     *
     * <p><em>Derived classes must call through to the super class's
     * implementation of this method.  If they do not, an exception will be
     * thrown.</em></p>
     *
     * @see #onResume
     */
@CallSuper
protected void onPostResume() {
    final Window win = getWindow();
    if (win != null)
        win.makeActive();
    if (mActionBar != null)
        mActionBar.setShowHideAnimationEnabled(true);
    mCalled = true;
}
Also used : PhoneWindow(com.android.internal.policy.PhoneWindow) Window(android.view.Window) CallSuper(android.annotation.CallSuper)

Example 4 with CallSuper

use of android.annotation.CallSuper in project platform_frameworks_base by android.

the class Fragment method onCreate.

/**
     * Called to do initial creation of a fragment.  This is called after
     * {@link #onAttach(Activity)} and before
     * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}, but is not called if the fragment
     * instance is retained across Activity re-creation (see {@link #setRetainInstance(boolean)}).
     *
     * <p>Note that this can be called while the fragment's activity is
     * still in the process of being created.  As such, you can not rely
     * on things like the activity's content view hierarchy being initialized
     * at this point.  If you want to do work once the activity itself is
     * created, see {@link #onActivityCreated(Bundle)}.
     *
     * <p>If your app's <code>targetSdkVersion</code> is {@link android.os.Build.VERSION_CODES#M}
     * or lower, child fragments being restored from the savedInstanceState are restored after
     * <code>onCreate</code> returns. When targeting {@link android.os.Build.VERSION_CODES#N} or
     * above and running on an N or newer platform version
     * they are restored by <code>Fragment.onCreate</code>.</p>
     *
     * @param savedInstanceState If the fragment is being re-created from
     * a previous saved state, this is the state.
     */
@CallSuper
public void onCreate(@Nullable Bundle savedInstanceState) {
    mCalled = true;
    final Context context = getContext();
    final int version = context != null ? context.getApplicationInfo().targetSdkVersion : 0;
    if (version >= Build.VERSION_CODES.N) {
        restoreChildFragmentState(savedInstanceState, true);
        if (mChildFragmentManager != null && !mChildFragmentManager.isStateAtLeast(Fragment.CREATED)) {
            mChildFragmentManager.dispatchCreate();
        }
    }
}
Also used : Context(android.content.Context) CallSuper(android.annotation.CallSuper)

Example 5 with CallSuper

use of android.annotation.CallSuper in project platform_frameworks_base by android.

the class Fragment method onInflate.

/**
     * Called when a fragment is being created as part of a view layout
     * inflation, typically from setting the content view of an activity.  This
     * may be called immediately after the fragment is created from a <fragment>
     * tag in a layout file.  Note this is <em>before</em> the fragment's
     * {@link #onAttach(Activity)} has been called; all you should do here is
     * parse the attributes and save them away.
     *
     * <p>This is called every time the fragment is inflated, even if it is
     * being inflated into a new instance with saved state.  It typically makes
     * sense to re-parse the parameters each time, to allow them to change with
     * different configurations.</p>
     *
     * <p>Here is a typical implementation of a fragment that can take parameters
     * both through attributes supplied here as well from {@link #getArguments()}:</p>
     *
     * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java
     *      fragment}
     *
     * <p>Note that parsing the XML attributes uses a "styleable" resource.  The
     * declaration for the styleable used here is:</p>
     *
     * {@sample development/samples/ApiDemos/res/values/attrs.xml fragment_arguments}
     * 
     * <p>The fragment can then be declared within its activity's content layout
     * through a tag like this:</p>
     *
     * {@sample development/samples/ApiDemos/res/layout/fragment_arguments.xml from_attributes}
     *
     * <p>This fragment can also be created dynamically from arguments given
     * at runtime in the arguments Bundle; here is an example of doing so at
     * creation of the containing activity:</p>
     *
     * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java
     *      create}
     *
     * @param context The Context that is inflating this fragment.
     * @param attrs The attributes at the tag where the fragment is
     * being created.
     * @param savedInstanceState If the fragment is being re-created from
     * a previous saved state, this is the state.
     */
@CallSuper
public void onInflate(Context context, AttributeSet attrs, Bundle savedInstanceState) {
    onInflate(attrs, savedInstanceState);
    mCalled = true;
    TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.Fragment);
    mEnterTransition = loadTransition(context, a, mEnterTransition, null, com.android.internal.R.styleable.Fragment_fragmentEnterTransition);
    mReturnTransition = loadTransition(context, a, mReturnTransition, USE_DEFAULT_TRANSITION, com.android.internal.R.styleable.Fragment_fragmentReturnTransition);
    mExitTransition = loadTransition(context, a, mExitTransition, null, com.android.internal.R.styleable.Fragment_fragmentExitTransition);
    mReenterTransition = loadTransition(context, a, mReenterTransition, USE_DEFAULT_TRANSITION, com.android.internal.R.styleable.Fragment_fragmentReenterTransition);
    mSharedElementEnterTransition = loadTransition(context, a, mSharedElementEnterTransition, null, com.android.internal.R.styleable.Fragment_fragmentSharedElementEnterTransition);
    mSharedElementReturnTransition = loadTransition(context, a, mSharedElementReturnTransition, USE_DEFAULT_TRANSITION, com.android.internal.R.styleable.Fragment_fragmentSharedElementReturnTransition);
    if (mAllowEnterTransitionOverlap == null) {
        mAllowEnterTransitionOverlap = a.getBoolean(com.android.internal.R.styleable.Fragment_fragmentAllowEnterTransitionOverlap, true);
    }
    if (mAllowReturnTransitionOverlap == null) {
        mAllowReturnTransitionOverlap = a.getBoolean(com.android.internal.R.styleable.Fragment_fragmentAllowReturnTransitionOverlap, true);
    }
    a.recycle();
    final Activity hostActivity = mHost == null ? null : mHost.getActivity();
    if (hostActivity != null) {
        mCalled = false;
        onInflate(hostActivity, attrs, savedInstanceState);
    }
}
Also used : TypedArray(android.content.res.TypedArray) CallSuper(android.annotation.CallSuper)

Aggregations

CallSuper (android.annotation.CallSuper)89 IBinder (android.os.IBinder)20 View (android.view.View)15 TextView (android.widget.TextView)15 Point (android.graphics.Point)13 Drawable (android.graphics.drawable.Drawable)13 Context (android.content.Context)10 ImageView (android.widget.ImageView)10 ListView (android.widget.ListView)10 Paint (android.graphics.Paint)8 ColorDrawable (android.graphics.drawable.ColorDrawable)8 InputMethodManager (android.view.inputmethod.InputMethodManager)8 ScrollBarDrawable (android.widget.ScrollBarDrawable)8 MainThread (android.annotation.MainThread)5 TypedArray (android.content.res.TypedArray)5 Uri (android.net.Uri)5 Parcelable (android.os.Parcelable)5 DocumentsContract.buildDocumentUri (android.provider.DocumentsContract.buildDocumentUri)5 DocumentsContract.buildTreeDocumentUri (android.provider.DocumentsContract.buildTreeDocumentUri)5 DocumentsContract.isTreeUri (android.provider.DocumentsContract.isTreeUri)5