APISonar


com.qihoo360.replugin.helper.LogDebug.LOG

> com > qihoo360 > replugin > helper > LogDebug > LOG
com APIs qihoo360 APIs replugin APIs helper APIs LogDebug APIs LOG APIs

Example 1
public static void stopSelf(Service s) {
        if (!RePluginFramework.mHostInitialized) {
            s.stopSelf();
            return;
        }

        try {
            ProxyRePluginServiceClientVar.stopSelf.call(null, s);
        } catch (Exception e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
        }
    }
Example 2
public static void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
        if (!RePluginFramework.mHostInitialized) {
            return;
        }

        try {
            ProxyRePluginVar.dump.call(null, fd, writer, args);
        } catch (Exception e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
        }
    }
Example 3
public static PackageInfo getPackageArchiveInfo(PackageManager pm, String pkgFilePath, int flags) {
        PackageInfo info = null;
        try {
            info = pm.getPackageArchiveInfo(pkgFilePath, flags);
        } catch (Throwable e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
        }

        return info;
    }
Example 4
public static IBinder fetchBinder(String pluginName, String module) {
        if (!RePluginFramework.mHostInitialized) {
            return null;
        }

        try {
            return (IBinder) ProxyRePluginVar.fetchBinder.call(null, pluginName, module);
        } catch (Exception e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
        }

        return null;
    }
Example 5
public static Context createActivityContext(Activity activity, Context newBase) {
        if (!RePluginFramework.mHostInitialized) {
            return newBase;
        }

        try {
            return (Context) ProxyRePluginInternalVar.createActivityContext.call(null, activity, newBase);
        } catch (Exception e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
        }

        return null;
    }
Example 6
public void onClientProcessKilled(String processName) {
        synchronized (LOCKER_PROCESS_KILLED) {
            mProcess2PluginsMap.remove(processName);

            if (LogDebug.LOG) {
                LogDebug.d(TAG, "onClientProcessKilled: Killed! process=" + processName + "; remains=" + mProcess2PluginsMap);
            }
        }
    }
Example 7
private static void extractFile(ZipFile zipFile, ZipEntry ze, File outFile) throws IOException {
        InputStream in = null;
        try {
            in = zipFile.getInputStream(ze);
            FileUtils.copyInputStreamToFile(in, outFile);
            if (LogDebug.LOG && RePlugin.getConfig().isPrintDetailLog()) {
                LogDebug.d(TAG, "extractFile(): Success! fn=" + outFile.getName());
            }
        } finally {
            CloseableUtils.closeQuietly(in);
        }
    }
Example 8
public boolean save(Context context) {
        try {
            final File f = getFile(context);
            final JSONArray jsonArr = new JSONArray();
            for (PluginInfo i : getCopyValues()) jsonArr.put(i.getJSON());
            FileUtils.writeStringToFile(f, jsonArr.toString(), Charsets.UTF_8);
            return true;
        } catch (IOException e) {
            if (LogDebug.LOG) {
                e.printStackTrace();
            }
            return false;
        }
    }
Example 9
public static void connectToServer(IPluginHost host) throws RemoteException {
        if (sRemote != null) {
            if (LogDebug.LOG) {
                LogDebug.e(TAG, "connectToServer: Already connected! host=" + sRemote);
            }
            return;
        }

        sRemote = host.fetchManagerServer();
    }
Example 10
public void addService(final String name, final IBinder service) {
        if (LogDebug.LOG) {
            LogDebug.d(TAG, "add service for IPlugin.query, name = " + name);
        }

        mServices.put(name, service);
    }
Example 11
public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
        if (LogDebug.LOG) {
            LogDebug.d(TAG, "update: cv=" + values);
        }

        if (TextUtils.isEmpty(selection)) {
            return 0;
        }
        switch (selection) {
            case SELECTION_INSTALL: {
                return install(values);
            }
        }
        return 0;
    }
Example 12
static void updateIsUsed(Context context, String pluginName, boolean used) {
        if (LogDebug.LOG) {
            LogDebug.i(TAG, "updateIsUsed: Prepare to send broadcast, pn=" + pluginName + "; used=" + used);
        }
        Intent intent = new Intent(ACTION_UPDATE_INFO);
        intent.putExtra("pn", pluginName);
        intent.putExtra("used", used);
        IPC.sendLocalBroadcast2AllSync(context, intent);
    }