一:原理分析
- 主要sendExtraCommand方法中传递两个参数, 根据如下源码可以知道第一个参数传递
delete_aiding_data
,第二个参数传递null
即可。
@Override
public boolean sendExtraCommand(String command, Bundle extras) {
long identity = Binder.clearCallingIdentity();
boolean result = false;
if ("delete_aiding_data".equals(command)) {
result = deleteAidingData(extras);
} else if ("force_time_injection".equals(command)) {
sendMessage(INJECT_NTP_TIME, 0, null);
result = true;
} else if ("force_xtra_injection".equals(command)) {
if (mSupportsXtra) {
xtraDownloadRequest();
result = true;
}
} else {
Log.w(TAG, "sendExtraCommand: unknown command " + command);
}
Binder.restoreCallingIdentity(identity);
return result