Search in sources :

Example 26 with HookAnnotation

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

the class FragmentHookList method performCreateView.

@HookAnnotation(className = "android.app.Fragment", methodName = "performCreateView", methodSig = "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;")
public static View performCreateView(Object thiz, LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    GTRLog.e(TAG, "performCreateView");
    long start = System.currentTimeMillis();
    View resultView = performCreateView_backup(thiz, inflater, container, savedInstanceState);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.app.Fragment) {
        fragmentClassName = ((android.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("Fragment.performCreateView").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());
    return resultView;
}
Also used : Activity(android.app.Activity) View(android.view.View) HookAnnotation(com.kunpeng.pit.HookAnnotation)

Example 27 with HookAnnotation

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

the class FragmentHookList method performActivityCreated.

@HookAnnotation(className = "android.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.app.Fragment) {
        fragmentClassName = ((android.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("Fragment.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 28 with HookAnnotation

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

the class FragmentHookList method performStop.

@HookAnnotation(className = "android.app.Fragment", methodName = "performStop", methodSig = "()V")
public static void performStop(Object thiz) {
    GTRLog.e(TAG, "performStop");
    long start = System.currentTimeMillis();
    performStop_backup(thiz);
    long end = System.currentTimeMillis();
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.app.Fragment) {
        fragmentClassName = ((android.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("Fragment.performStop").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 29 with HookAnnotation

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

the class FragmentHookList method setUserVisibleHint.

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

Example 30 with HookAnnotation

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

the class FragmentHookList method onHiddenChanged.

@HookAnnotation(className = "android.app.Fragment", methodName = "onHiddenChanged", methodSig = "(Z)V")
public static void onHiddenChanged(Object thiz, boolean hidden) {
    GTRLog.e(TAG, "onHiddenChanged:" + hidden);
    long time = System.currentTimeMillis();
    onHiddenChanged_backup(thiz, hidden);
    String activityClassName = "";
    String activityHashCode = "";
    String fragmentClassName = "";
    String fragmentHashCode = "";
    Object fragment = thiz;
    if (fragment instanceof android.app.Fragment) {
        fragmentClassName = ((android.app.Fragment) fragment).getClass().getName();
        fragmentHashCode = "" + thiz.hashCode();
        Activity activity = ((android.app.Fragment) fragment).getActivity();
        if (activity != null) {
            activityClassName = activity.getClass().getName();
            activityHashCode = "" + activity.hashCode();
        }
    }
    GTRClient.pushData(new StringBuilder().append("Fragment.onHiddenChanged").append(GTConfig.separator).append(activityClassName).append(GTConfig.separator).append(activityHashCode).append(GTConfig.separator).append(fragmentClassName).append(GTConfig.separator).append(fragmentHashCode).append(GTConfig.separator).append(time).append(GTConfig.separator).append(hidden).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