项目:IFWManager
文件:IntentResolver.java
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,mTypedActionToFilter," TypedAction: ");
}
}
项目:IFWManager
文件:IntentResolver.java
void removeFilterInternal(F f) {
if (localLOGV) {
Slog.v(TAG,"Removing filter: " + f);
f.dump(new LogPrinter(Log.VERBOSE," Cleaning Lookup Maps:");
}
int numS = unregister_intent_filter(f," Scheme: ");
int numT = unregister_mime_types(f," Type: ");
if (numS == 0 && numT == 0) {
unregister_intent_filter(f," Action: ");
}
if (numT != 0) {
unregister_intent_filter(f," TypedAction: ");
}
}
项目:container
文件:VPackageManagerService.java
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);
}
}
项目:container
文件:VPackageManagerService.java
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," ");
}
removeFilter(intent);
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:Android-plugin-support
文件:DynamicApkManager.java
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," ");
}
}
}
项目:ApkLauncher
文件:IntentResolver.java
public void addFilter(F f) {
if (localLOGV) {
Slog.v(TAG,TAG/*,Log.LOG_ID_SYstem*/)," TypedAction: ");
}
}
项目:ApkLauncher
文件:IntentResolver.java
void removeFilterInternal(F f) {
if (localLOGV) {
Slog.v(TAG," TypedAction: ");
}
}
项目:koala--Android-Plugin-Runtime-
文件:IntentResolver.java
public void addFilter(F f) {
if (localLOGV) {
Slog.v(TAG," TypedAction: ");
}
}
项目:koala--Android-Plugin-Runtime-
文件:IntentResolver.java
void removeFilterInternal(F f) {
if (localLOGV) {
Slog.v(TAG," TypedAction: ");
}
}
项目:PluginM
文件:PluginManager.java
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();
}
}
}
}
}
项目:android-overlay-protection
文件:BaseDetectionEngine.java
@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,activityInfo.packageName));
if (!checkWhitelistHit(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;
}
}
项目:FakeLocation
文件:LocationRecorder.java
public LocationRecorder(Context context)
{
mPrinter = new LogPrinter(Log.DEBUG,"LocationRecorder");
mDbManager = new LocationRecorderDbManager(context);
mCurrentRecordId = -1;
}
项目:droidel
文件:ActivityThread.java
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");
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。