com.google.android.gms.tagmanager.Container Java Examples
The following examples show how to use
com.google.android.gms.tagmanager.Container.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BaseVpnService.java From ShadowsocksRR with Apache License 2.0 | 6 votes |
public String getBlackList() { String defaultList = getString(R.string.black_list); try { Container container = app.containerHolder.getContainer(); String update = container.getString("black_list_lite"); String list; if (update == null || update.isEmpty()) { list = defaultList; } else { list = update; } return "exclude = " + list + ";"; } catch (Exception e) { return "exclude = " + defaultList + ";"; } }
Example #2
Source File: BaseService.java From ShadowsocksRR with Apache License 2.0 | 6 votes |
public String getBlackList() { String defaultList = getString(R.string.black_list); try { Container container = app.containerHolder.getContainer(); String update = container.getString("black_list_lite"); String list; if (update == null || update.isEmpty()) { list = defaultList; } else { list = update; } return "exclude = " + list + ";"; } catch (Exception e) { return "exclude = " + defaultList + ";"; } }
Example #3
Source File: BaseVpnService.java From Maying with Apache License 2.0 | 6 votes |
public String getBlackList() { String defaultList = getString(R.string.black_list); try { Container container = ShadowsocksApplication.app.containerHolder.getContainer(); String update = container.getString("black_list_lite"); String list; if (update == null || update.isEmpty()) { list = defaultList; } else { list = update; } return "exclude = " + list + ";"; } catch (Exception e) { return "exclude = " + defaultList + ";"; } }
Example #4
Source File: BaseService.java From Maying with Apache License 2.0 | 6 votes |
public String getBlackList() { String defaultList = getString(R.string.black_list); try { Container container = ShadowsocksApplication.app.containerHolder.getContainer(); String update = container.getString("black_list_lite"); String list; if (update == null || update.isEmpty()) { list = defaultList; } else { list = update; } return "exclude = " + list + ";"; } catch (Exception e) { return "exclude = " + defaultList + ";"; } }
Example #5
Source File: ShadowsocksApplication.java From ShadowsocksRR with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); app = this; // init toast utils ToastUtils.init(getApplicationContext()); initVariable(); if (!BuildConfig.DEBUG) { java.lang.System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "ERROR"); } AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); checkChineseLocale(getResources().getConfiguration()); TagManager tm = TagManager.getInstance(this); PendingResult<ContainerHolder> pending = tm.loadContainerPreferNonDefault("GTM-NT8WS8", R.raw.gtm_default_container); ResultCallback<ContainerHolder> callback = new ResultCallback<ContainerHolder>() { @Override public void onResult(@NonNull ContainerHolder holder) { if (!holder.getStatus().isSuccess()) { return; } containerHolder = holder; Container container = holder.getContainer(); container.registerFunctionCallMacroCallback(SIG_FUNC, new Container.FunctionCallMacroCallback() { @Override public Object getValue(String functionName, Map<String, Object> parameters) { if (SIG_FUNC.equals(functionName)) { return Utils.getSignature(getApplicationContext()); } else { return null; } } }); } }; pending.setResultCallback(callback, 2, TimeUnit.SECONDS); JobManager.create(this).addJobCreator(new DonaldTrump()); if (settings.getBoolean(Constants.Key.tfo, false) && TcpFastOpen.supported()) { mThreadPool.execute(new Runnable() { @Override public void run() { TcpFastOpen.enabled(settings.getBoolean(Constants.Key.tfo, false)); } }); } }
Example #6
Source File: ShadowsocksApplication.java From Maying with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); app = this; // init toast utils ToastUtils.init(getApplicationContext()); initVariable(); if (!BuildConfig.DEBUG) { java.lang.System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "ERROR"); } AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); checkChineseLocale(getResources().getConfiguration()); TagManager tm = TagManager.getInstance(this); PendingResult<ContainerHolder> pending = tm.loadContainerPreferNonDefault("GTM-NT8WS8", R.raw.gtm_default_container); ResultCallback<ContainerHolder> callback = new ResultCallback<ContainerHolder>() { @Override public void onResult(@NonNull ContainerHolder holder) { if (!holder.getStatus().isSuccess()) { return; } containerHolder = holder; Container container = holder.getContainer(); container.registerFunctionCallMacroCallback(SIG_FUNC, new Container.FunctionCallMacroCallback() { @Override public Object getValue(String functionName, Map<String, Object> parameters) { if (SIG_FUNC.equals(functionName)) { return Utils.getSignature(getApplicationContext()); } else { return null; } } }); } }; pending.setResultCallback(callback, 2, TimeUnit.SECONDS); JobManager.create(this).addJobCreator(new DonaldTrump()); if (settings.getBoolean(Constants.Key.tfo, false) && TcpFastOpen.supported()) { mThreadPool.execute(new Runnable() { @Override public void run() { TcpFastOpen.enabled(settings.getBoolean(Constants.Key.tfo, false)); } }); } }