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;
}
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());
}
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());
}
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());
}
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());
}
Aggregations