本文整理汇总了Java中org.chromium.base.MemoryPressureListener类的典型用法代码示例。如果您正苦于以下问题:Java MemoryPressureListener类的具体用法?Java MemoryPressureListener怎么用?Java MemoryPressureListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MemoryPressureListener类属于org.chromium.base包,在下文中一共展示了MemoryPressureListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onNewIntent
import org.chromium.base.MemoryPressureListener; //导入依赖的package包/类
@Override
protected void onNewIntent(Intent intent) {
if (getCommandLineParamsFromIntent(intent) != null) {
Log.i(TAG, "Ignoring command line params: can only be set when creating the activity.");
}
if (ACTION_LOW_MEMORY.equals(intent.getAction())) {
MemoryPressureListener.simulateMemoryPressureSignal(TRIM_MEMORY_COMPLETE);
return;
} else if (ACTION_TRIM_MEMORY_MODERATE.equals(intent.getAction())) {
MemoryPressureListener.simulateMemoryPressureSignal(TRIM_MEMORY_MODERATE);
return;
}
String url = getUrlFromIntent(intent);
if (!TextUtils.isEmpty(url)) {
Shell activeView = getActiveShell();
if (activeView != null) {
activeView.loadUrl(url);
}
}
}
示例2: onNewIntent
import org.chromium.base.MemoryPressureListener; //导入依赖的package包/类
@Override
protected void onNewIntent(Intent intent) {
if (getCommandLineParamsFromIntent(intent) != null) {
Log.i(TAG, "Ignoring command line params: can only be set when creating the activity.");
}
if (MemoryPressureListener.handleDebugIntent(this, intent.getAction())) return;
String url = getUrlFromIntent(intent);
if (!TextUtils.isEmpty(url)) {
Shell activeView = getActiveShell();
if (activeView != null) {
activeView.loadUrl(url);
}
}
}
示例3: handleDebugIntent
import org.chromium.base.MemoryPressureListener; //导入依赖的package包/类
private void handleDebugIntent(Intent intent) {
if (ACTION_CLOSE_TABS.equals(intent.getAction())) {
getTabModelSelector().closeAllTabs();
} else if (MemoryPressureListener.handleDebugIntent(ChromeTabbedActivity.this,
intent.getAction())) {
// Handled.
}
}
示例4: onNewIntent
import org.chromium.base.MemoryPressureListener; //导入依赖的package包/类
@Override
protected void onNewIntent(Intent intent) {
if (MemoryPressureListener.handleDebugIntent(this, intent.getAction())) return;
String url = getUrlFromIntent(intent);
if (!TextUtils.isEmpty(url)) {
TestShellTab tab = getActiveTab();
if (tab != null) tab.loadUrlWithSanitization(url);
}
}