下面列出了android.os.Bundle#setAllowFds ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw new RuntimeException("Failure from system", e);
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null);
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null);
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
final LoadedApk.ReceiverDispatcher rd;
if (intent == null) {
Log.wtf(TAG, "Null intent received");
rd = null;
} else {
rd = mDispatcher.get();
}
if (ActivityThread.DEBUG_BROADCAST) {
int seq = intent.getIntExtra("seq", -1);
Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction()
+ " seq=" + seq + " to " + (rd != null ? rd.mReceiver : null));
}
if (rd != null) {
rd.performReceive(intent, resultCode, data, extras,
ordered, sticky, sendingUser);
} else {
// The activity manager dispatched a broadcast to a registered
// receiver in this process, but before it could be delivered the
// receiver was unregistered. Acknowledge the broadcast on its
// behalf so that the system's broadcast sequence can continue.
if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
"Finishing broadcast to unregistered receiver");
IActivityManager mgr = ActivityManager.getService();
try {
if (extras != null) {
extras.setAllowFds(false);
}
mgr.finishReceiver(this, resultCode, data, extras, false, intent.getFlags());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, getUserId());
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId());
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId());
} catch (RemoteException e) {
// System has crashed, nothing we can do.
}
return false;
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManagerNative.getDefault().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public boolean startInstrumentation(ComponentName className,
String profileFile, Bundle arguments) {
try {
if (arguments != null) {
arguments.setAllowFds(false);
}
return ActivityManager.getService().startInstrumentation(
className, profileFile, 0, arguments, null, null, getUserId(),
null /* ABI override */);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
final LoadedApk.ReceiverDispatcher rd;
if (intent == null) {
Log.wtf(TAG, "Null intent received");
rd = null;
} else {
rd = mDispatcher.get();
}
if (ActivityThread.DEBUG_BROADCAST) {
int seq = intent.getIntExtra("seq", -1);
Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction()
+ " seq=" + seq + " to " + (rd != null ? rd.mReceiver : null));
}
if (rd != null) {
rd.performReceive(intent, resultCode, data, extras,
ordered, sticky, sendingUser);
} else {
// The activity manager dispatched a broadcast to a registered
// receiver in this process, but before it could be delivered the
// receiver was unregistered. Acknowledge the broadcast on its
// behalf so that the system's broadcast sequence can continue.
if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
"Finishing broadcast to unregistered receiver");
IActivityManager mgr = ActivityManager.getService();
try {
if (extras != null) {
extras.setAllowFds(false);
}
mgr.finishReceiver(this, resultCode, data, extras, false, intent.getFlags());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}