• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RunningActivities类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.morgoo.droidplugin.am.RunningActivities的典型用法代码示例。如果您正苦于以下问题:Java RunningActivities类的具体用法?Java RunningActivities怎么用?Java RunningActivities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RunningActivities类属于com.morgoo.droidplugin.am包,在下文中一共展示了RunningActivities类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onActivityCreated

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
private void onActivityCreated(Activity activity) throws RemoteException {
    try {
        Intent targetIntent = activity.getIntent();
        if (targetIntent != null) {
            ActivityInfo targetInfo = targetIntent.getParcelableExtra(Env.EXTRA_TARGET_INFO);
            ActivityInfo stubInfo = targetIntent.getParcelableExtra(Env.EXTRA_STUB_INFO);
            if (targetInfo != null && stubInfo != null) {
                RunningActivities.onActivtyCreate(activity, targetInfo, stubInfo);
                activity.setRequestedOrientation(targetInfo.screenOrientation);
                PluginManager.getInstance().onActivityCreated(stubInfo, targetInfo);
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    fixTaskDescription(activity, targetInfo);
                }
            }
        }
    } catch (Exception e) {
        Log.i(TAG, "onActivityCreated fail", e);
    }
}
 

开发者ID:amikey,
项目名称:DroidPlugin,
代码行数:20,
代码来源:PluginInstrumentation.java

示例2: onActivityOnNewIntent

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
private void onActivityOnNewIntent(Activity activity, Intent intent) throws RemoteException {
    //
    try {
        Intent targetIntent = activity.getIntent();
        if (targetIntent != null) {
            ActivityInfo targetInfo = targetIntent.getParcelableExtra(Env.EXTRA_TARGET_INFO);
            ActivityInfo stubInfo = targetIntent.getParcelableExtra(Env.EXTRA_STUB_INFO);
            if (targetInfo != null && stubInfo != null) {
                RunningActivities.onActivtyOnNewIntent(activity, targetInfo, stubInfo, intent);
                PluginManager.getInstance().onActivtyOnNewIntent(stubInfo, targetInfo, intent);
            }
        }
    } catch (Exception e) {
        Log.i(TAG, "onActivityCreated fail", e);
    }
}
 

开发者ID:amikey,
项目名称:DroidPlugin,
代码行数:17,
代码来源:PluginInstrumentation.java

示例3: callActivityOnDestroy

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
@Override
public void callActivityOnDestroy(Activity activity) {
    if (mTarget != null) {
        mTarget.callActivityOnDestroy(activity);
    } else {
        super.callActivityOnDestroy(activity);
    }
    RunningActivities.onActivtyDestory(activity);

    if (enable) {
        try {
            onActivityDestory(activity);
        } catch (RemoteException e) {
            Log.e(TAG, "callActivityOnDestroy:onActivityDestory", e);
        }
    }
}
 

开发者ID:amikey,
项目名称:DroidPlugin,
代码行数:18,
代码来源:PluginInstrumentation.java

示例4: onActivityCreated

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
private void onActivityCreated(Activity activity) throws RemoteException {
    try {
        Intent targetIntent = activity.getIntent();
        if (targetIntent != null) {
            ActivityInfo targetInfo = targetIntent.getParcelableExtra(Env.EXTRA_TARGET_INFO);
            ActivityInfo stubInfo = targetIntent.getParcelableExtra(Env.EXTRA_STUB_INFO);
            if (targetInfo != null && stubInfo != null) {
                RunningActivities.onActivtyCreate(activity, targetInfo, stubInfo);
                activity.setRequestedOrientation(targetInfo.screenOrientation);
                PluginManager.getInstance().onActivityCreated(stubInfo, targetInfo);
                fixTaskDescription(activity, targetInfo);
            }
        }
    } catch (Exception e) {
        Log.i(TAG, "onActivityCreated fail", e);
    }
}
 

开发者ID:SteamedBunZL,
项目名称:DroidPluginLibrary,
代码行数:18,
代码来源:PluginInstrumentation.java

示例5: onActivityCreated

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
private void onActivityCreated(Activity activity) throws RemoteException {
    try {
        Intent targetIntent = activity.getIntent();
        if (targetIntent != null) {
            ActivityInfo targetInfo = targetIntent.getParcelableExtra(Env.EXTRA_TARGET_INFO);
            ActivityInfo stubInfo = targetIntent.getParcelableExtra(Env.EXTRA_STUB_INFO);
            if (targetInfo != null && stubInfo != null) {
                RunningActivities.onActivtyCreate(activity, targetInfo, stubInfo);
                if (activity.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
                        && targetInfo.screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
                    activity.setRequestedOrientation(targetInfo.screenOrientation);
                }
                PluginManager.getInstance().onActivityCreated(stubInfo, targetInfo);
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    fixTaskDescription(activity, targetInfo);
                }
            }
        }
    } catch (Exception e) {
        Log.i(TAG, "onActivityCreated fail", e);
    }
}
 

开发者ID:weijianfeng,
项目名称:DynamicAppLoader,
代码行数:23,
代码来源:PluginInstrumentation.java

示例6: callActivityOnDestroy

点赞 3

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
@Override
public void callActivityOnDestroy(Activity activity) {
    if (mTarget != null) {
        mTarget.callActivityOnDestroy(activity);
    } else {
        super.callActivityOnDestroy(activity);
    }
    RunningActivities.onActivtyDestory(activity);

    if (enable) {
        try {
            onActivityDestory(activity);
        } catch (RemoteException e) {
            Log.e(TAG, "callActivityOnDestroy:onActivityDestroy", e);
        }
    }
}
 

开发者ID:weijianfeng,
项目名称:DynamicAppLoader,
代码行数:18,
代码来源:PluginInstrumentation.java

示例7: beforeInvoke

点赞 2

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
@Override
protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable {

    RunningActivities.beforeStartActivity();
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        //2.3
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug) throws RemoteException;*/

        //api 15
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug, String profileFile,
    ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException;*/

        //api 16,17
/*  public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/
        doReplaceIntentForStartActivityAPILow(args);
    } else {
        //api 18,19
 /*  public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/

        //api 21
/*   public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, ProfilerInfo profilerInfo,
    Bundle options) throws RemoteException;*/
        doReplaceIntentForStartActivityAPIHigh(args);
    }
    return super.beforeInvoke(receiver, method, args);
}
 

开发者ID:SteamedBunZL,
项目名称:DroidPluginLibrary,
代码行数:41,
代码来源:IActivityManagerHookHandle.java

示例8: beforeInvoke

点赞 2

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
@Override
protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable {

    RunningActivities.beforeStartActivity();
    boolean bRet = true;
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        //2.3
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug) throws RemoteException;*/

        //api 15
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug, String profileFile,
    ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException;*/

        //api 16,17
/*  public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/
        bRet = doReplaceIntentForStartActivityAPILow(args);
    } else {
        //api 18,19
 /*  public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/

        //api 21
/*   public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, ProfilerInfo profilerInfo,
    Bundle options) throws RemoteException;*/
        bRet = doReplaceIntentForStartActivityAPIHigh(args);
    }
    if (!bRet) {
        setFakedResult(Activity.RESULT_CANCELED);
        return true;
    }

    return super.beforeInvoke(receiver, method, args);
}
 

开发者ID:amikey,
项目名称:DroidPlugin,
代码行数:47,
代码来源:IActivityManagerHookHandle.java

示例9: beforeInvoke

点赞 2

import com.morgoo.droidplugin.am.RunningActivities; //导入依赖的package包/类
@Override
protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable {

    RunningActivities.beforeStartActivity();
    boolean bRet = true;
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        //2.3
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug) throws RemoteException;*/

        //api 15
/*public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, Uri[] grantedUriPermissions,
    int grantedMode, IBinder resultTo, String resultWho, int requestCode,
    boolean onlyIfNeeded, boolean debug, String profileFile,
    ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException;*/

        //api 16,17
/*  public int startActivity(IApplicationThread caller,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/
        bRet = doReplaceIntentForStartActivityAPILow(args);
    } else {
        //api 18,19
 /*  public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, String profileFile,
    ParcelFileDescriptor profileFd, Bundle options) throws RemoteException;*/

        //api 21
/*   public int startActivity(IApplicationThread caller, String callingPackage,
    Intent intent, String resolvedType, IBinder resultTo, String resultWho,
    int requestCode, int flags, ProfilerInfo profilerInfo,
    Bundle options) throws RemoteException;*/
        bRet = doReplaceIntentForStartActivityAPIHigh(args);
    }
    if (! bRet){
        setFakedResult(Activity.RESULT_CANCELED);
        return true;
    }

    return super.beforeInvoke(receiver, method, args);
}
 

开发者ID:yoxin,
项目名称:pet,
代码行数:47,
代码来源:IActivityManagerHookHandle.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)