java.lang.RuntimeException: Unable to resume activity with java.lang.IllegalArgumentException

In the method Activity#isTopOfTask we can see:

private boolean isTopOfTask() {
    if (mToken == null || mWindow == null) {
        return false;
    }
    try {
        return ActivityManager.getService().isTopOfTask(getActivityToken());
    } catch (RemoteException e) {
        return false;
    }
}

And in ActivityManagerService#isTopOfTask we can found:

@Override
public boolean isTopOfTask(IBinder token) {
    synchronized (this) {
        ActivityRecord r = ActivityRecord.isInStackLocked(token);
        if (r == null) {
            throw new IllegalArgumentException();
        }
        return r.task.getTopActivity() == r;
    }
}

So, I think that ActivityRecord is null.But I don’t know why it is null….

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)