Search in sources :

Example 11 with HookAnnotation

use of com.kunpeng.pit.HookAnnotation in project GT by Tencent.

the class FragmentHookList_v4 method performDestroy.

@HookAnnotation(className = "android.support.v4.app.Fragment", methodName = "performDestroy", methodSig = "()V")
public static void performDestroy(Object thiz) {
    GTRLog.e(TAG, "performDestroy");
    long start = System.currentTimeMillis();
    performDestroy_backup(thiz);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.support.v4.app.Fragment) {
        fragmentClassName = ((android.support.v4.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.support.v4.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("FragmentV4.performDestroy").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(start).append(GTConfig.separator).append(end).toString());
}
Also used : Activity(android.app.Activity) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Example 12 with HookAnnotation

use of com.kunpeng.pit.HookAnnotation in project GT by Tencent.

the class FragmentHookList_v4 method performActivityCreated.

@HookAnnotation(className = "android.support.v4.app.Fragment", methodName = "performActivityCreated", methodSig = "(Landroid/os/Bundle;)V")
public static void performActivityCreated(Object thiz, Bundle savedInstanceState) {
    GTRLog.e(TAG, "performActivityCreated");
    long start = System.currentTimeMillis();
    performActivityCreated_backup(thiz, savedInstanceState);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.support.v4.app.Fragment) {
        fragmentClassName = ((android.support.v4.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.support.v4.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("FragmentV4.performActivityCreated").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(start).append(GTConfig.separator).append(end).toString());
}
Also used : Activity(android.app.Activity) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Example 13 with HookAnnotation

use of com.kunpeng.pit.HookAnnotation in project GT by Tencent.

the class FragmentHookList_v4 method onAttach.

/**
 * Fragment 生命周期: *
 */
@HookAnnotation(className = "android.support.v4.app.Fragment", methodName = "onAttach", methodSig = "(Landroid/content/Context;)V")
public static void onAttach(Object thiz, Context context) {
    GTRLog.e(TAG, "onAttach");
    long start = System.currentTimeMillis();
    onAttach_backup(thiz, context);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.support.v4.app.Fragment) {
        fragmentClassName = ((android.support.v4.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.support.v4.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("FragmentV4.onAttach").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(start).append(GTConfig.separator).append(end).toString());
}
Also used : Activity(android.app.Activity) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Example 14 with HookAnnotation

use of com.kunpeng.pit.HookAnnotation in project GT by Tencent.

the class FragmentHookList_v4 method performResume.

@HookAnnotation(className = "android.support.v4.app.Fragment", methodName = "performResume", methodSig = "()V")
public static void performResume(Object thiz) {
    GTRLog.e(TAG, "performResume");
    long start = System.currentTimeMillis();
    performResume_backup(thiz);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.support.v4.app.Fragment) {
        fragmentClassName = ((android.support.v4.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.support.v4.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("FragmentV4.performResume").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(start).append(GTConfig.separator).append(end).toString());
}
Also used : Activity(android.app.Activity) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Example 15 with HookAnnotation

use of com.kunpeng.pit.HookAnnotation in project GT by Tencent.

the class FragmentHookList_v4 method performCreate.

@HookAnnotation(className = "android.support.v4.app.Fragment", methodName = "performCreate", methodSig = "(Landroid/os/Bundle;)V")
public static void performCreate(Object thiz, Bundle savedInstanceState) {
    GTRLog.e(TAG, "performCreate");
    long start = System.currentTimeMillis();
    performCreate_backup(thiz, savedInstanceState);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.support.v4.app.Fragment) {
        fragmentClassName = ((android.support.v4.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.support.v4.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("FragmentV4.performCreate").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(start).append(GTConfig.separator).append(end).toString());
}
Also used : Activity(android.app.Activity) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Aggregations

HookAnnotation (com.kunpeng.pit.HookAnnotation)30 Activity (android.app.Activity)26 View (android.view.View)3 Instrumentation (android.app.Instrumentation)1 ActivityResult (android.app.Instrumentation.ActivityResult)1 Cursor (android.database.Cursor)1 SQLiteDatabase (android.database.sqlite.SQLiteDatabase)1