本文整理汇总了Java中android.util.LogPrinter类的典型用法代码示例。如果您正苦于以下问题:Java LogPrinter类的具体用法?Java LogPrinter怎么用?Java LogPrinter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LogPrinter类属于android.util包,在下文中一共展示了LogPrinter类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addFilter
import android.util.LogPrinter; //导入依赖的package包/类
public void addFilter(F f) {
if (localLOGV) {
Slog.v(TAG, "Adding filter: " + f);
f.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), " ");
Slog.v(TAG, " Building Lookup Maps:");
}
mFilters.add(f);
int numS = register_intent_filter(f, f.schemesIterator(),
mSchemeToFilter, " Scheme: ");
int numT = register_mime_types(f, " Type: ");
if (numS == 0 && numT == 0) {
register_intent_filter(f, f.actionsIterator(),
mActionToFilter, " Action: ");
}
if (numT != 0) {
register_intent_filter(f, f.actionsIterator(),
mTypedActionToFilter, " TypedAction: ");
}
}
开发者ID:TaRGroup,项目名称:IFWManager,代码行数:21,代码来源:IntentResolver.java
示例2: removeFilterInternal
import android.util.LogPrinter; //导入依赖的package包/类
void removeFilterInternal(F f) {
if (localLOGV) {
Slog.v(TAG, "Removing filter: " + f);
f.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), " ");
Slog.v(TAG, " Cleaning Lookup Maps:");
}
int numS = unregister_intent_filter(f, f.schemesIterator(),
mSchemeToFilter, " Scheme: ");
int numT = unregister_mime_types(f, " Type: ");
if (numS == 0 && numT == 0) {
unregister_intent_filter(f, f.actionsIterator(),
mActionToFilter, " Action: ");
}
if (numT != 0) {
unregister_intent_filter(f, f.actionsIterator(),
mTypedActionToFilter, " TypedAction: ");
}
}
开发者ID:TaRGroup,项目名称:IFWManager,代码行数:20,代码来源:IntentResolver.java
示例3: addActivity
import android.util.LogPrinter; //导入依赖的package包/类
public final void addActivity(PackageParser.Activity a, String type) {
final boolean systemApp = isSystemApp(a.info.applicationInfo);
mActivities.put(a.getComponentName(), a);
if (DEBUG_SHOW_INFO)
Log.v(TAG, " " + type + " "
+ (a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel : a.info.name) + ":");
if (DEBUG_SHOW_INFO)
Log.v(TAG, " Class=" + a.info.name);
final int NI = a.intents.size();
for (int j = 0; j < NI; j++) {
PackageParser.ActivityIntentInfo intent = a.intents.get(j);
if (!systemApp && intent.getPriority() > 0 && "activity".equals(type)) {
intent.setPriority(0);
Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity " + a.className
+ " with priority > 0, forcing to 0");
}
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
addFilter(intent);
}
}
开发者ID:codehz,项目名称:container,代码行数:24,代码来源:VPackageManagerService.java
示例4: removeActivity
import android.util.LogPrinter; //导入依赖的package包/类
public final void removeActivity(PackageParser.Activity a, String type) {
mActivities.remove(a.getComponentName());
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " " + type + " "
+ (a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel : a.info.name) + ":");
Log.v(TAG, " Class=" + a.info.name);
}
final int NI = a.intents.size();
for (int j = 0; j < NI; j++) {
PackageParser.ActivityIntentInfo intent = a.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
removeFilter(intent);
}
}
开发者ID:codehz,项目名称:container,代码行数:18,代码来源:VPackageManagerService.java
示例5: addActivity
import android.util.LogPrinter; //导入依赖的package包/类
public final void addActivity(DynamicApkParser.Activity a, String type) {
mActivities.put(a.getComponentName().getClassName(), a);
if (DEBUG_SHOW_INFO)
Log.v(
TAG, " " + type + " " +
(a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel : a.info.name) + ":");
if (DEBUG_SHOW_INFO)
Log.v(TAG, " Class=" + a.info.name);
final int NI = a.intents.size();
for (int j=0; j<NI; j++) {
DynamicApkParser.ActivityIntentInfo intent = a.intents.get(j);
if (intent.getPriority() > 0 && "activity".equals(type)) {
intent.setPriority(0);
Log.w(TAG, "Package " + a.info.applicationInfo.packageName + " has activity "
+ a.className + " with priority > 0, forcing to 0");
}
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:23,代码来源:DynamicApkManager.java
示例6: removeActivity
import android.util.LogPrinter; //导入依赖的package包/类
public final void removeActivity(DynamicApkParser.Activity a, String type) {
mActivities.remove(a.getComponentName().getClassName());
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " " + type + " "
+ (a.info.nonLocalizedLabel != null ? a.info.nonLocalizedLabel
: a.info.name) + ":");
Log.v(TAG, " Class=" + a.info.name);
}
final int NI = a.intents.size();
for (int j=0; j<NI; j++) {
DynamicApkParser.ActivityIntentInfo intent = a.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:18,代码来源:DynamicApkManager.java
示例7: addService
import android.util.LogPrinter; //导入依赖的package包/类
public final void addService(DynamicApkParser.Service s) {
mServices.put(s.getComponentName().getClassName(), s);
if (DEBUG_SHOW_INFO)
Log.v(
TAG, " " +
(s.info.nonLocalizedLabel != null ? s.info.nonLocalizedLabel : s.info.name) + ":");
if (DEBUG_SHOW_INFO)
Log.v(TAG, " Class=" + s.info.name);
final int NI = s.intents.size();
for (int j=0; j<NI; j++) {
DynamicApkParser.ServiceIntentInfo intent = s.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:18,代码来源:DynamicApkManager.java
示例8: removeService
import android.util.LogPrinter; //导入依赖的package包/类
public final void removeService(DynamicApkParser.Service s, String type) {
mServices.remove(s.getComponentName().getClassName());
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " " + type + " "
+ (s.info.nonLocalizedLabel != null ? s.info.nonLocalizedLabel
: s.info.name) + ":");
Log.v(TAG, " Class=" + s.info.name);
}
final int NI = s.intents.size();
for (int j=0; j<NI; j++) {
DynamicApkParser.ServiceIntentInfo intent = s.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:18,代码来源:DynamicApkManager.java
示例9: addProvider
import android.util.LogPrinter; //导入依赖的package包/类
public final void addProvider(DynamicApkParser.Provider p) {
mProviders.put(p.getComponentName().getClassName(), p);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " "
+ (p.info.nonLocalizedLabel != null
? p.info.nonLocalizedLabel : p.info.name) + ":");
Log.v(TAG, " Class=" + p.info.name);
}
final int NI = p.intents.size();
int j;
for (j = 0; j < NI; j++) {
DynamicApkParser.ProviderIntentInfo intent = p.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:20,代码来源:DynamicApkManager.java
示例10: removeProvider
import android.util.LogPrinter; //导入依赖的package包/类
public final void removeProvider(DynamicApkParser.Provider p) {
mProviders.remove(p.getComponentName().getClassName());
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " " + (p.info.nonLocalizedLabel != null
? p.info.nonLocalizedLabel : p.info.name) + ":");
Log.v(TAG, " Class=" + p.info.name);
}
final int NI = p.intents.size();
int j;
for (j = 0; j < NI; j++) {
DynamicApkParser.ProviderIntentInfo intent = p.intents.get(j);
if (DEBUG_SHOW_INFO) {
Log.v(TAG, " IntentFilter:");
intent.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
}
}
}
开发者ID:ximsfei,项目名称:Android-plugin-support,代码行数:18,代码来源:DynamicApkManager.java
示例11: addFilter
import android.util.LogPrinter; //导入依赖的package包/类
public void addFilter(F f) {
if (localLOGV) {
Slog.v(TAG, "Adding filter: " + f);
f.dump(new LogPrinter(Log.VERBOSE, TAG/*, Log.LOG_ID_SYSTEM*/), " ");
Slog.v(TAG, " Building Lookup Maps:");
}
mFilters.add(f);
int numS = register_intent_filter(f, f.schemesIterator(),
mSchemeToFilter, " Scheme: ");
int numT = register_mime_types(f, " Type: ");
if (numS == 0 && numT == 0) {
register_intent_filter(f, f.actionsIterator(),
mActionToFilter, " Action: ");
}
if (numT != 0) {
register_intent_filter(f, f.actionsIterator(),
mTypedActionToFilter, " TypedAction: ");
}
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:21,代码来源:IntentResolver.java
示例12: removeFilterInternal
import android.util.LogPrinter; //导入依赖的package包/类
void removeFilterInternal(F f) {
if (localLOGV) {
Slog.v(TAG, "Removing filter: " + f);
f.dump(new LogPrinter(Log.VERBOSE, TAG/*, Log.LOG_ID_SYSTEM*/), " ");
Slog.v(TAG, " Cleaning Lookup Maps:");
}
int numS = unregister_intent_filter(f, f.schemesIterator(),
mSchemeToFilter, " Scheme: ");
int numT = unregister_mime_types(f, " Type: ");
if (numS == 0 && numT == 0) {
unregister_intent_filter(f, f.actionsIterator(),
mActionToFilter, " Action: ");
}
if (numT != 0) {
unregister_intent_filter(f, f.actionsIterator(),
mTypedActionToFilter, " TypedAction: ");
}
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:20,代码来源:IntentResolver.java
示例13: loadStaticReceivers
import android.util.LogPrinter; //导入依赖的package包/类
private void loadStaticReceivers(PluginInfo pluginInfo) {
Map<ActivityInfo, List<IntentFilter>> receiverIntentFilters = pluginInfo.pkgParser.getReceiverIntentFilter();
if (receiverIntentFilters != null) {
for (Map.Entry<ActivityInfo, List<IntentFilter>> entry : receiverIntentFilters.entrySet()) {
ActivityInfo receiverInfo = entry.getKey();
List<IntentFilter> intentFilters = entry.getValue();
String currentProcessName = ProcessHelper.sProcessName;
String stubProcessName = selectStubProcessName(receiverInfo.processName, receiverInfo.packageName);
if (!TextUtils.isEmpty(currentProcessName) && currentProcessName.equals(stubProcessName)) {
try {
Logger.d(TAG, "loadStaticReceivers() receiverInfo = " + receiverInfo);
BroadcastReceiver receiver = (BroadcastReceiver) pluginInfo.classLoader.loadClass(receiverInfo.name).newInstance();
int i = 1;
for (IntentFilter filter : intentFilters) {
pluginInfo.application.registerReceiver(receiver, filter);
Logger.d(TAG, "loadStaticReceivers() IntentFilter No." + i++ + " :");
filter.dump(new LogPrinter(Log.DEBUG, "loadStaticReceivers() "), "");
Logger.d(TAG, "loadStaticReceivers() \n");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
开发者ID:xyxyLiu,项目名称:PluginM,代码行数:30,代码来源:PluginManager.java
示例14: handleEvent
import android.util.LogPrinter; //导入依赖的package包/类
@Override
public void handleEvent(AccessibilityEvent event) {
// Avoid processing events when screen is locked
if (_keyguardManager != null) {
boolean locked = _keyguardManager.inKeyguardRestrictedInputMode();
if (locked) {
Log.i(TAG, "Screen locked, skipping overlay check!");
return;
}
}
Log.d(TAG, String.format("New event %s", event.toString()));
_eventCounter.newEvent();
_notifyService.updateNotificationCount(_eventCounter.getLastMinuteEventCount());
if (_resultReceiver != null) {
Bundle bundle = new Bundle();
bundle.putLong("eventCount", _eventCounter.getLastMinuteEventCount());
_resultReceiver.send(ServiceCommunication.MSG_EVENT_COUNT_UPDATE, bundle);
}
// When overlay is detected avoid performing useless computation
if (_overlayState.isHasOverlay() || _overlayState.isPendingUninstall())
return;
if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
if (event.getPackageName() == null)
return;
String eventPackage = event.getPackageName().toString();
ComponentName componentName = new ComponentName(
eventPackage,
event.getClassName().toString()
);
ActivityInfo activityInfo = tryGetActivity(componentName);
boolean isActivity = activityInfo != null;
if (isActivity) {
LogPrinter logPrinter = new LogPrinter(Log.DEBUG, TAG);
activityInfo.dump(logPrinter, "");
}
String className = event.getClassName().toString();
// Perform detection
boolean parentAvailable = event.getSource() != null ? event.getSource().getParent() != null : false;
Log.d(TAG, String.format("Collected info isActivity %s, parentAvailable: %s", String.valueOf(isActivity), String.valueOf(parentAvailable)));
if (_overlayState.getIgnoreOncePackage().equals(eventPackage)) {
Log.d(TAG, String.format("Package %s ignored once", eventPackage));
} else if (eventPackage.equals(previousEventPackage)) {
Log.d(TAG, String.format("Last two event have the same package %s, skipping check!", eventPackage));
} else if (_layoutClasses.contains(className) && !isActivity && !parentAvailable) {
Log.d(TAG, String.format("Detected suspicious class %s without activity and parent for process %s, checking whitelist", className, eventPackage));
if (!checkWhitelistHit(eventPackage)) {
Log.d(TAG, "No whitelist entry found");
if (checkSuspectedApps(eventPackage)) {
Log.d(TAG, String.format("******* VIEW OVERLAY DETECTED!!!"));
_overlayState.setOffender(eventPackage);
_overlayState.setProcess(_currentProcess);
_notifyService.processOverlayState(_overlayState);
}
} else {
Log.d(TAG, "Whitelist hit skipping!");
}
} else if (isActivity && activityInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE && !parentAvailable) {
Log.d(TAG, String.format("Detected suspicious activity %s with single instance flag, checking whitelist", activityInfo.packageName));
if (!checkWhitelistHit(eventPackage)) {
Log.d(TAG, "No whitelist entry found");
if (checkSuspectedApps(eventPackage)) {
Log.d(TAG, String.format("******* ACTIVITY OVERLAY DETECTED!!!"));
_overlayState.setOffender(eventPackage);
_overlayState.setProcess(_currentProcess);
_notifyService.processOverlayState(_overlayState);
}
} else {
Log.d(TAG, "Whitelist hit skipping!");
}
}
previousEventPackage = eventPackage;
}
}
开发者ID:geeksonsecurity,项目名称:android-overlay-protection,代码行数:82,代码来源:BaseDetectionEngine.java
示例15: LocationRecorder
import android.util.LogPrinter; //导入依赖的package包/类
public LocationRecorder(Context context)
{
mPrinter = new LogPrinter(Log.DEBUG, "LocationRecorder");
mDbManager = new LocationRecorderDbManager(context);
mCurrentRecordId = -1;
}
开发者ID:panda73111,项目名称:FakeLocation,代码行数:7,代码来源:LocationRecorder.java
示例16: main
import android.util.LogPrinter; //导入依赖的package包/类
public static void main(DroidelStubs stubs) {
droidelStubs = stubs;
SamplingProfilerIntegration.start();
// CloseGuard defaults to true and can be quite spammy. We
// disable it here, but selectively enable it later (via
// StrictMode) on debug builds, but using DropBox, not logs.
//CloseGuard.setEnabled(false);
Environment.initForCurrentUser();
// Set the reporter for event logging in libcore
//EventLogger.setReporter(new EventLoggingReporter());
Security.addProvider(new AndroidKeyStoreProvider());
Process.setArgV0("<pre-initialized>");
Looper.prepareMainLooper();
ActivityThread thread = new ActivityThread();
thread.attach(false);
if (sMainThreadHandler == null) {
sMainThreadHandler = thread.getHandler();
}
AsyncTask.init();
if (false) {
Looper.myLooper().setMessageLogging(new
LogPrinter(Log.DEBUG, "ActivityThread"));
}
// create all possible messages!
// for each activity
ApplicationThread appThread = thread.getApplicationThread();
try {
while (Nondet.nondetBool()) {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
appThread.onTransact(Nondet.nondetInt(), data, reply, Nondet.nondetInt());
}
} catch (RemoteException e) {}
// end for each activity
Looper.loop();
throw new RuntimeException("Main thread loop unexpectedly exited");
}
开发者ID:cuplv,项目名称:droidel,代码行数:52,代码来源:ActivityThread.java
注:本文中的android.util.LogPrinter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论