本文整理汇总了Java中com.google.ipc.invalidation.external.client.android.service.AndroidLogger类的典型用法代码示例。如果您正苦于以下问题:Java AndroidLogger类的具体用法?Java AndroidLogger怎么用?Java AndroidLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AndroidLogger类属于com.google.ipc.invalidation.external.client.android.service包,在下文中一共展示了AndroidLogger类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; //导入依赖的package包/类
/**
* This is called once per ChromeApplication instance, which get created per process
* (browser OR renderer). Don't stick anything in here that shouldn't be called multiple times
* during Chrome's lifetime.
*/
@Override
public void onCreate() {
UmaUtils.recordMainEntryPointTime();
super.onCreate();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null && MultiWindowUtils.getInstance().isMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(this, createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(this);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(this, SESSIONS_UUID_PREF_KEY), false);
}
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:45,代码来源:ChromeApplication.java
示例2: createResourcesBuilder
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; //导入依赖的package包/类
/**
* Constructs a {@link SystemResourcesBuilder} instance using default scheduling, Android-style
* logging, and storage, and using {@code network} to send and receive messages.
*/
public static SystemResourcesBuilder createResourcesBuilder(String logPrefix,
NetworkChannel network, Storage storage) {
SystemResourcesBuilder builder = new SystemResourcesBuilder(AndroidLogger.forPrefix(logPrefix),
new ExecutorBasedScheduler("ticl" + logPrefix),
new ExecutorBasedScheduler("ticl-listener" + logPrefix),
network, storage);
builder.setPlatform("Android-" + android.os.Build.VERSION.RELEASE);
return builder;
}
开发者ID:morristech,项目名称:android-chromium,代码行数:14,代码来源:AndroidResourcesFactory.java
示例3: handlePreNativeInitialization
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; //导入依赖的package包/类
/**
* Performs the shared class initialization.
*/
protected void handlePreNativeInitialization() {
ChromeApplication application = (ChromeApplication) ContextUtils.getApplicationContext();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null
&& MultiWindowUtils.getInstance().isLegacyMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(
application, application.createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(application);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(
application, SESSIONS_UUID_PREF_KEY), false);
}
开发者ID:JackyAndroid,项目名称:AndroidChromium,代码行数:45,代码来源:ProcessInitializationHandler.java
示例4: handlePreNativeInitialization
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; //导入依赖的package包/类
/**
* Performs the shared class initialization.
*/
protected void handlePreNativeInitialization() {
ChromeApplication application = (ChromeApplication) ContextUtils.getApplicationContext();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null
&& MultiWindowUtils.getInstance().isLegacyMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(
AppHooks.get().createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(application);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(
application, SESSIONS_UUID_PREF_KEY), false);
// Indicate that we can use the GMS location provider.
LocationProviderFactory.useGmsCoreLocationProvider();
}
开发者ID:mogoweb,项目名称:365browser,代码行数:48,代码来源:ProcessInitializationHandler.java
示例5: AndroidResources
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger; //导入依赖的package包/类
/**
* Creates an instance of resources for production code.
*
* @param context Android system context
* @param clock source of time for the internal scheduler
* @param logPrefix log prefix
*/
private AndroidResources(Context context, AndroidClock clock, String logPrefix) {
super(AndroidLogger.forPrefix(logPrefix), new AndroidInternalScheduler(context, clock),
new InvalidScheduler(), new AndroidNetworkChannel(context), new AndroidStorage(context),
getPlatformString());
this.context = Preconditions.checkNotNull(context);
}
开发者ID:mogoweb,项目名称:365browser,代码行数:14,代码来源:ResourcesFactory.java
注:本文中的com.google.ipc.invalidation.external.client.android.service.AndroidLogger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论