微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android.os.TransactionTooLargeException的实例源码

项目:FlickLauncher    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException ||
                e.getCause() instanceof DeadobjectException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:SimpleUILauncher    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException ||
                e.getCause() instanceof DeadobjectException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:FLauncher    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException ||
                e.getCause() instanceof DeadobjectException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:Acdisplay    文件MyAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        //noinspection StatementWithEmptyBody
        if (e.getCause() instanceof TransactionTooLargeException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:chromium-for-android-56-debug-video    文件IntentUtils.java   
/**
 * Given an exception,check whether it wrapped a {@link TransactionTooLargeException}.  If it
 * does,then log the underlying error.  If not,throw the original exception again.
 *
 * @param e      The caught RuntimeException.
 * @param intent The intent that triggered the RuntimeException to be thrown.
 */
public static void logTransactionTooLargeOrRethrow(RuntimeException e,Intent intent) {
    // See http://crbug.com/369574.
    if (e.getCause() instanceof TransactionTooLargeException) {
        Log.e(TAG,"Could not resolve Activity for intent " + intent.toString(),e);
    } else {
        throw e;
    }
}
项目:prevent    文件ActivityManagerService.java   
public ComponentName startService(IApplicationThread caller,Intent service,String resolvedType,String callingPackage,int userId)
        throws TransactionTooLargeException {
    try {
        PreventRunningUtils.setSender(caller);
        if (PreventRunningUtils.hookStartService(caller,service)) {
            return startService$Pr(caller,service,resolvedType,callingPackage,userId);
        }
        return null;
    } finally {
        PreventRunningUtils.clearSender();
    }
}
项目:prevent    文件ActivityManagerService.java   
public int bindService(IApplicationThread caller,IBinder token,IServiceConnection connection,int flags,int userId) throws TransactionTooLargeException {
    try {
        PreventRunningUtils.setSender(caller);
        if (PreventRunningUtils.hookBindService(caller,token,service)) {
            return bindService$Pr(caller,connection,flags,userId);
        } else {
            return 0;
        }
    } finally {
        PreventRunningUtils.clearSender();
    }
}
项目:FlickLauncher    文件WidgetsModel.java   
public WidgetsModel updateAndClone(Context context) {
    Preconditions.assertWorkerThread();

    try {
        final ArrayList<WidgetItem> widgetsAndShortcuts = new ArrayList<>();
        // Widgets
        AppWidgetManagerCompat widgetManager = AppWidgetManagerCompat.getInstance(context);
        for (appwidgetproviderInfo widgetInfo : widgetManager.getAllProviders()) {
            widgetsAndShortcuts.add(new WidgetItem(
                    LauncherappwidgetproviderInfo.fromProviderInfo(context,widgetInfo),widgetManager));
        }

        // Shortcuts
        PackageManager pm = context.getPackageManager();
        for (ResolveInfo info :
                pm.queryIntentActivities(new Intent(Intent.ACTION_CREATE_SHORTCUT),0)) {
            widgetsAndShortcuts.add(new WidgetItem(info,pm));
        }
        setWidgetsAndShortcuts(widgetsAndShortcuts);
    } catch (Exception e) {
        if (!ProviderConfig.IS_DOGFOOD_BUILD &&
                (e.getCause() instanceof TransactionTooLargeException ||
                        e.getCause() instanceof DeadobjectException)) {
            // the returned value may be incomplete and will not be refreshed until the next
            // time Launcher starts.
            // Todo: after figuring out a repro step,introduce a dirty bit to check when
            // onResume is called to refresh the widget provider list.
        } else {
            throw e;
        }
    }
    return clone();
}
项目:SimpleUILauncher    文件WidgetsModel.java   
public WidgetsModel updateAndClone(Context context) {
    Preconditions.assertWorkerThread();

    try {
        final ArrayList<WidgetItem> widgetsAndShortcuts = new ArrayList<>();
        // Widgets
        AppWidgetManagerCompat widgetManager = AppWidgetManagerCompat.getInstance(context);
        for (appwidgetproviderInfo widgetInfo : widgetManager.getAllProviders()) {
            widgetsAndShortcuts.add(new WidgetItem(
                    LauncherappwidgetproviderInfo.fromProviderInfo(context,introduce a dirty bit to check when
            // onResume is called to refresh the widget provider list.
        } else {
            throw e;
        }
    }
    return clone();
}
项目:SimplOS    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:AndroidChromium    文件IntentUtils.java   
/**
 * Given an exception,e);
    } else {
        throw e;
    }
}
项目:Vafrinn    文件CustomTab.java   
private static void logTransactionTooLargeOrRethrow(RuntimeException e,e);
    } else {
        throw e;
    }
}
项目:Vafrinn    文件ExternalNavigationDelegateImpl.java   
private static void logTransactionTooLargeOrRethrow(RuntimeException e,e);
    } else {
        throw e;
    }
}
项目:DeviceConnect-Android    文件DevicePluginManager.java   
/**
 * アプリ一覧からデバイスプラグイン一覧を作成する.
 *
 * @throws PluginDetectionException アプリケーション一覧のサイズが大きすぎて取得できなかった場合
 */
public void createDevicePluginList() throws PluginDetectionException {
    PackageManager pkgMgr = mContext.getPackageManager();

    Map<String,List<DevicePlugin>> allPlugins;
    try {
        allPlugins = getInstalledplugins(pkgMgr);
    } catch (Exception e) {
        PluginDetectionException.Reason reason;
        if (Build.VERSION.SDK_INT >= 15) {
            if (e.getClass() == TransactionTooLargeException.class) {
                reason = PluginDetectionException.Reason.TOO_MANY_PACKAGES;
            } else {
                reason = PluginDetectionException.Reason.OTHER;
            }
        } else {
            reason = PluginDetectionException.Reason.OTHER;
        }
        throw new PluginDetectionException(e,reason);
    }

    for (Map.Entry<String,List<DevicePlugin>> entry : allPlugins.entrySet()) {
        List<DevicePlugin> pluginListPerPackage = entry.getValue();

        // 重複したプラグインを除外
        for (DevicePlugin plugin : filterPlugin(pluginListPerPackage)) {
            mPlugins.put(plugin.getPluginId(),plugin);
            notifyFound(plugin);
        }
    }
}
项目:FLauncher    文件WidgetsModel.java   
public WidgetsModel updateAndClone(Context context) {
    Utilities.assertWorkerThread();

    try {
        final ArrayList<Object> widgetsAndShortcuts = new ArrayList<>();
        // Widgets
        for (appwidgetproviderInfo widgetInfo :
                AppWidgetManagerCompat.getInstance(context).getAllProviders()) {
            widgetsAndShortcuts.add(LauncherappwidgetproviderInfo
                    .fromProviderInfo(context,widgetInfo));
        }
        // Shortcuts
        widgetsAndShortcuts.addAll(context.getPackageManager().queryIntentActivities(
                new Intent(Intent.ACTION_CREATE_SHORTCUT),0));
        setWidgetsAndShortcuts(widgetsAndShortcuts);
    } catch (Exception e) {
        if (!LauncherAppState.isDogfoodBuild() &&
                (e.getCause() instanceof TransactionTooLargeException ||
                        e.getCause() instanceof DeadobjectException)) {
            // the returned value may be incomplete and will not be refreshed until the next
            // time Launcher starts.
            // Todo: after figuring out a repro step,introduce a dirty bit to check when
            // onResume is called to refresh the widget provider list.
        } else {
            throw e;
        }
    }
    return clone();
}
项目:365browser    文件IntentUtils.java   
/**
 * Given an exception,e);
    } else {
        throw e;
    }
}
项目:LB-Launcher    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:LeanLauncher    文件LauncherAppWidgetHost.java   
@Override
public void startListening() {
    try {
        super.startListening();
    } catch (Exception e) {
        if (e.getCause() instanceof TransactionTooLargeException) {
            // We're willing to let this slide. The exception is being caused by the list of
            // RemoteViews which is being passed back. The startListening relationship will
            // have been established by this point,and we will end up populating the
            // widgets upon bind anyway. See issue 14255011 for more context.
        } else {
            throw new RuntimeException(e);
        }
    }
}
项目:LaunchEnr    文件Utilities.java   
public static boolean isBinderSizeError(Exception e) {
    return e.getCause() instanceof TransactionTooLargeException
            || e.getCause() instanceof DeadobjectException;
}
项目:prevent    文件ActivityManagerService.java   
public ComponentName startService$Pr(IApplicationThread caller,int userId)
        throws TransactionTooLargeException {
    throw new UnsupportedOperationException();
}
项目:prevent    文件ActivityManagerService.java   
public int bindService$Pr(IApplicationThread caller,int userId) throws TransactionTooLargeException {
    throw new UnsupportedOperationException();
}
项目:XPrivacy    文件Util.java   
public static void bug(XHook hook,Throwable ex) {
    if (ex instanceof InvocationTargetException) {
        InvocationTargetException exex = (InvocationTargetException) ex;
        if (exex.getTargetException() != null)
            ex = exex.getTargetException();
    }

    int priority;
    if (ex instanceof ActivityShare.AbortException)
        priority = Log.WARN;
    else if (ex instanceof ActivityShare.ServerException)
        priority = Log.WARN;
    else if (ex instanceof ConnectTimeoutException)
        priority = Log.WARN;
    else if (ex instanceof FileNotFoundException)
        priority = Log.WARN;
    else if (ex instanceof HttpHostConnectException)
        priority = Log.WARN;
    else if (ex instanceof NameNotFoundException)
        priority = Log.WARN;
    else if (ex instanceof NoClassDefFoundError)
        priority = Log.WARN;
    else if (ex instanceof OutOfMemoryError)
        priority = Log.WARN;
    else if (ex instanceof RuntimeException)
        priority = Log.WARN;
    else if (ex instanceof SecurityException)
        priority = Log.WARN;
    else if (ex instanceof SocketTimeoutException)
        priority = Log.WARN;
    else if (ex instanceof SSLPeerUnverifiedException)
        priority = Log.WARN;
    else if (ex instanceof StackOverflowError)
        priority = Log.WARN;
    else if (ex instanceof TransactionTooLargeException)
        priority = Log.WARN;
    else if (ex instanceof UnkNownHostException)
        priority = Log.WARN;
    else if (ex instanceof UnsatisfiedLinkError)
        priority = Log.WARN;
    else
        priority = Log.ERROR;

    boolean xprivacy = false;
    for (StackTraceElement frame : ex.getStackTrace())
        if (frame.getClassName() != null && frame.getClassName().startsWith("biz.bokhorst.xprivacy")) {
            xprivacy = true;
            break;
        }
    if (!xprivacy)
        priority = Log.WARN;

    log(hook,priority,ex.toString() + " uid=" + Process.myUid() + "\n" + Log.getStackTraceString(ex));
}
项目:smarper    文件Util.java   
public static void bug(XHook hook,ex.toString() + " uid=" + Process.myUid() + "\n" + Log.getStackTraceString(ex));
}
项目:xprivacy-mod    文件Util.java   
public static void bug(XHook hook,ex.toString() + " uid=" + Process.myUid() + "\n" + Log.getStackTraceString(ex));
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。