Java Code Examples for android.os.Bundle#setAllowFds()

The following examples show how to use android.os.Bundle#setAllowFds() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@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();
    }
}
 
Example 2
@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();
    }
}
 
Example 3
@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);
    }
}
 
Example 4
@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();
    }
}
 
Example 5
@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();
    }
}
 
Example 6
@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;
}
 
Example 7
@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;
}
 
Example 8
@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;
}
 
Example 9
@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();
    }
}
 
Example 10
@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();
        }
    }
}
 
Example 11
@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();
    }
}
 
Example 12
@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;
}
 
Example 13
@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;
}
 
Example 14
@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;
}
 
Example 15
@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;
}
 
Example 16
@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();
    }
}
 
Example 17
Source Project: android_9.0.0_r45   File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@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();
    }
}
 
Example 18
Source Project: android_9.0.0_r45   File: LoadedApk.java    License: Apache License 2.0 5 votes vote down vote up
@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();
        }
    }
}