项目:zjdroid
文件:AlarmManagerHook.java
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",ClassLoader.getSystemClassLoader(),"setImpl",int.class,long.class,PendingIntent.class,WorkSource.class);
hookhelper.hookMethod(setImplmethod,new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
项目:AppTroy
文件:AlarmManagerHook.java
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
项目:ZJDroid
文件:AlarmManagerHook.java
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
项目:ZjDroid-master
文件:AlarmManagerHook.java
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
if(intent != null)
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
@Override
public void onSetRequest(ProviderRequestUnbundled requests,WorkSource source) {
Log.v(TAG,"onSetRequest: " + requests + " by " + source);
long autoTime = Math.max(requests.getInterval(),FASTEST_REFRESH_INTERVAL);
boolean autoUpdate = requests.getReportLocation();
Log.v(TAG,"using autoUpdate=" + autoUpdate + " autoTime=" + autoTime);
if (autoUpdate) {
helper.setTime(autoTime);
helper.enable();
} else {
helper.disable();
}
}
项目:ZjDroid
文件:AlarmManagerHook.java
@Override
public void startHook() {
Method setImplmethod = RefInvoke.findMethodExact(
"android.app.AlarmManager",new AbstractBahaviorHookCallBack() {
@Override
public void descParam(HookParam param) {
Logger.log_behavior("The Alarm @R_917_4045@ion:");
PendingIntent intent = (PendingIntent) param.args[4];
descPendingIntent(intent);
Logger.log_behavior("TriggerAtMillis = "+param.args[1]);
Logger.log_behavior("windowMillis = "+param.args[2]);
Logger.log_behavior("intervalMillis = "+param.args[3]);
}
});
}
项目:pyneo-wirelesslocation
文件:LocationRequest.java
@Override
public LocationRequest createFromParcel(Parcel in) {
LocationRequest request = new LocationRequest();
request.setQuality(in.readInt());
request.setFastestInterval(in.readLong());
request.setInterval(in.readLong());
request.setExpireAt(in.readLong());
request.setNumUpdates(in.readInt());
request.setSmallestdisplacement(in.readFloat());
request.setHideFromAppOps(in.readInt() != 0);
String provider = in.readString();
if (provider != null)
request.setProvider(provider);
WorkSource workSource = in.readParcelable(null);
if (workSource != null)
request.setWorkSource(workSource);
return request;
}
项目:VirtualHook
文件:AlarmManagerStub.java
@Override
public boolean beforeCall(Object who,Method method,Object... args) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && args[0] instanceof String) {
args[0] = getHostPkg();
}
int index = ArrayUtils.indexOfFirst(args,WorkSource.class);
if (index >= 0) {
args[index] = null;
}
return true;
}
项目:TPlayer
文件:WifiManagerStub.java
@Override
public Object call(Object who,Object... args) throws Throwable {
int index = ArrayUtils.indexOfFirst(args,WorkSource.class);
if (index >= 0) {
args[index] = null;
}
return super.call(who,method,args);
}
项目:TPlayer
文件:AlarmManagerStub.java
@Override
public boolean beforeCall(Object who,WorkSource.class);
if (index >= 0) {
args[index] = null;
}
return true;
}
项目:container
文件:AlarmManagerPatch.java
@Override
public boolean beforeCall(Object who,WorkSource.class);
if (index >= 0) {
args[index] = null;
}
return true;
}
项目:android-proxy
文件:WifiManager.java
/**
* Request a scan for access points. Returns immediately. The availability
* of the results is made kNown later by means of an asynchronous event sent
* on completion of the scan.
* @return {@code true} if the operation succeeded,i.e.,the scan was initiated
*/
public boolean startScan() {
try {
final WorkSource workSource = null;
mService.startScan(workSource);
return true;
} catch (remoteexception e) {
return false;
}
}
项目:android-proxy
文件:WifiManager.java
/** @hide */
public boolean startScan(WorkSource workSource) {
try {
mService.startScan(workSource);
return true;
} catch (remoteexception e) {
return false;
}
}
@Override
public void onSetMinTime(long minTime,WorkSource ws) {
Log.v(TAG,"onSetMinTime: " + minTime + " by " + ws);
autoTime = Math.max(minTime,FASTEST_REFRESH_INTERVAL);
helper.setTime(autoTime);
if (autoUpdate) helper.enable();
}
项目:pyneo-wirelesslocation
文件:NetworkLocationProviderV2.java
@Override
public void onSetRequest(final ProviderRequestUnbundled requests,final WorkSource ws) {
try {
if (DEBUG) Log.d(TAG,"onSetRequest: requests=" + requests + ",ws=" + ws);
wirelessEnvListener.disable();
long autoTime = Long.MAX_VALUE;
boolean autoUpdate = false;
for (final LocationRequestUnbundled request : requests.getLocationRequests()) {
if (DEBUG) Log.d(TAG,"onSetRequest: request=" + request);
if (autoTime > request.getInterval()) {
autoTime = request.getInterval();
}
autoUpdate = true;
}
if (autoUpdate) {
if (autoTime < 1500) {
autoTime = 1500;
}
wirelessEnvListener.setTime(autoTime);
wirelessEnvListener.enable();
}
else {
wirelessEnvListener.disable();
}
}
catch (Exception e) {
Log.e(TAG,"onSetRequest: e=" + e,e);
}
}
/**
* @hide
*/
public WorkSource getWorkSource() {
return null;
}
项目:pyneo-wirelesslocation
文件:NetworkLocationProviderV1.java
@Override
public void onAddListener(final int uid,final WorkSource ws) {
if (DEBUG) Log.d(TAG,uid + " is listening as " + ws != null ? (ws + " (contents:" + ws.describeContents() + ")") : "[unkNown WorkSource]");
}
项目:pyneo-wirelesslocation
文件:NetworkLocationProviderV1.java
@Override
public void onRemoveListener(final int uid,final WorkSource ws) {
}
项目:pyneo-wirelesslocation
文件:NetworkLocationProviderV1.java
@Override
public void onSetMinTime(final long minTime,final WorkSource ws) {
autoTime = minTime;
}
项目:pyneo-wirelesslocation
文件:LocationProvider.java
public void setMinTime(long minTime,WorkSource ws) {
LocationProvider.this.onSetMinTime(minTime,ws);
}
项目:pyneo-wirelesslocation
文件:LocationProvider.java
public void addListener(int uid) {
LocationProvider.this.onAddListener(uid,new WorkSource(uid));
}
项目:pyneo-wirelesslocation
文件:LocationProvider.java
public void removeListener(int uid) {
LocationProvider.this.onRemoveListener(uid,new WorkSource(uid));
}
项目:pyneo-wirelesslocation
文件:LocationRequest.java
/**
* @hide
*/
public WorkSource getWorkSource() {
return mWorkSource;
}
/**
* Notifies the location provider of the smallest minimum time between updates amongst
* all clients that are listening for locations. This allows the provider to reduce
* the frequency of updates to match the requested frequency.
*
* @param minTime the smallest minTime value over all listeners for this provider.
* @param ws the source this work is coming from.
*/
public abstract void onSetMinTime(long minTime,WorkSource ws);
/**
* Set the {@link ProviderRequest} requirements for this provider.
* <p>Each call to this method overrides all prevIoUs requests.
* <p>This method might trigger the provider to start returning
* locations,or to stop returning locations,depending on the
* parameters in the request.
*/
public abstract void onSetRequest(ProviderRequestUnbundled request,WorkSource source);
/**
* Sets the WorkSource to use for power blaming of this location request.
* <p/>
* <p>No permissions are required to make this call,however the LocationManager
* will throw a SecurityException when requesting location updates if the caller
* doesn't have the {@link android.Manifest.permission#UPDATE_DEVICE_STATS} permission.
*
* @param workSource WorkSource defining power blame for this location request.
* @hide
*/
public void setWorkSource(WorkSource workSource) {
}
@Override
public void onAddListener(int uid,WorkSource ws) {
}
@Override
public void onRemoveListener(int uid,WorkSource ws) {
}
项目:pyneo-wirelesslocation
文件:LocationProvider.java
/**
* Notifies the location provider of the smallest minimum time between updates amongst
* all clients that are listening for locations. This allows the provider to reduce
* the frequency of updates to match the requested frequency.
*
* @param minTime the smallest minTime value over all listeners for this provider.
* @param ws the source this work is coming from.
*/
public abstract void onSetMinTime(long minTime,WorkSource ws);
项目:pyneo-wirelesslocation
文件:LocationProvider.java
项目:pyneo-wirelesslocation
文件:LocationProvider.java
项目:pyneo-wirelesslocation
文件:LocationRequest.java
/**
* Sets the WorkSource to use for power blaming of this location request.
* <p/>
* <p>No permissions are required to make this call,however the LocationManager
* will throw a SecurityException when requesting location updates if the caller
* doesn't have the {@link android.Manifest.permission#UPDATE_DEVICE_STATS} permission.
*
* @param workSource WorkSource defining power blame for this location request.
* @hide
*/
public void setWorkSource(WorkSource workSource) {
mWorkSource = workSource;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。