Search in sources :

Example 1 with ActivityState

use of com.android.server.am.ActivityStack.ActivityState in project android_frameworks_base by DirtyUnicorns.

the class ActivityStackSupervisor method validateTopActivitiesLocked.

void validateTopActivitiesLocked() {
    for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
        final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityRecord r = stack.topRunningActivityLocked();
            final ActivityState state = r == null ? DESTROYED : r.state;
            if (isFocusedStack(stack)) {
                if (r == null)
                    Slog.e(TAG, "validateTop...: null top activity, stack=" + stack);
                else {
                    final ActivityRecord pausing = stack.mPausingActivity;
                    if (pausing != null && pausing == r)
                        Slog.e(TAG, "validateTop...: top stack has pausing activity r=" + r + " state=" + state);
                    if (state != INITIALIZING && state != RESUMED)
                        Slog.e(TAG, "validateTop...: activity in front not resumed r=" + r + " state=" + state);
                }
            } else {
                final ActivityRecord resumed = stack.mResumedActivity;
                if (resumed != null && resumed == r)
                    Slog.e(TAG, "validateTop...: back stack has resumed activity r=" + r + " state=" + state);
                if (r != null && (state == INITIALIZING || state == RESUMED))
                    Slog.e(TAG, "validateTop...: activity in back resumed r=" + r + " state=" + state);
            }
        }
    }
}
Also used : ActivityState(com.android.server.am.ActivityStack.ActivityState)

Example 2 with ActivityState

use of com.android.server.am.ActivityStack.ActivityState in project platform_frameworks_base by android.

the class ActivityStackSupervisor method validateTopActivitiesLocked.

void validateTopActivitiesLocked() {
    for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
        final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityRecord r = stack.topRunningActivityLocked();
            final ActivityState state = r == null ? DESTROYED : r.state;
            if (isFocusedStack(stack)) {
                if (r == null)
                    Slog.e(TAG, "validateTop...: null top activity, stack=" + stack);
                else {
                    final ActivityRecord pausing = stack.mPausingActivity;
                    if (pausing != null && pausing == r)
                        Slog.e(TAG, "validateTop...: top stack has pausing activity r=" + r + " state=" + state);
                    if (state != INITIALIZING && state != RESUMED)
                        Slog.e(TAG, "validateTop...: activity in front not resumed r=" + r + " state=" + state);
                }
            } else {
                final ActivityRecord resumed = stack.mResumedActivity;
                if (resumed != null && resumed == r)
                    Slog.e(TAG, "validateTop...: back stack has resumed activity r=" + r + " state=" + state);
                if (r != null && (state == INITIALIZING || state == RESUMED))
                    Slog.e(TAG, "validateTop...: activity in back resumed r=" + r + " state=" + state);
            }
        }
    }
}
Also used : ActivityState(com.android.server.am.ActivityStack.ActivityState)

Example 3 with ActivityState

use of com.android.server.am.ActivityStack.ActivityState in project android_frameworks_base by AOSPA.

the class ActivityStackSupervisor method validateTopActivitiesLocked.

void validateTopActivitiesLocked() {
    for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
        final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityRecord r = stack.topRunningActivityLocked();
            final ActivityState state = r == null ? DESTROYED : r.state;
            if (isFocusedStack(stack)) {
                if (r == null)
                    Slog.e(TAG, "validateTop...: null top activity, stack=" + stack);
                else {
                    final ActivityRecord pausing = stack.mPausingActivity;
                    if (pausing != null && pausing == r)
                        Slog.e(TAG, "validateTop...: top stack has pausing activity r=" + r + " state=" + state);
                    if (state != INITIALIZING && state != RESUMED)
                        Slog.e(TAG, "validateTop...: activity in front not resumed r=" + r + " state=" + state);
                }
            } else {
                final ActivityRecord resumed = stack.mResumedActivity;
                if (resumed != null && resumed == r)
                    Slog.e(TAG, "validateTop...: back stack has resumed activity r=" + r + " state=" + state);
                if (r != null && (state == INITIALIZING || state == RESUMED))
                    Slog.e(TAG, "validateTop...: activity in back resumed r=" + r + " state=" + state);
            }
        }
    }
}
Also used : ActivityState(com.android.server.am.ActivityStack.ActivityState)

Example 4 with ActivityState

use of com.android.server.am.ActivityStack.ActivityState in project android_frameworks_base by ResurrectionRemix.

the class ActivityStackSupervisor method validateTopActivitiesLocked.

void validateTopActivitiesLocked() {
    for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
        final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityRecord r = stack.topRunningActivityLocked();
            final ActivityState state = r == null ? DESTROYED : r.state;
            if (isFocusedStack(stack)) {
                if (r == null)
                    Slog.e(TAG, "validateTop...: null top activity, stack=" + stack);
                else {
                    final ActivityRecord pausing = stack.mPausingActivity;
                    if (pausing != null && pausing == r)
                        Slog.e(TAG, "validateTop...: top stack has pausing activity r=" + r + " state=" + state);
                    if (state != INITIALIZING && state != RESUMED)
                        Slog.e(TAG, "validateTop...: activity in front not resumed r=" + r + " state=" + state);
                }
            } else {
                final ActivityRecord resumed = stack.mResumedActivity;
                if (resumed != null && resumed == r)
                    Slog.e(TAG, "validateTop...: back stack has resumed activity r=" + r + " state=" + state);
                if (r != null && (state == INITIALIZING || state == RESUMED))
                    Slog.e(TAG, "validateTop...: activity in back resumed r=" + r + " state=" + state);
            }
        }
    }
}
Also used : ActivityState(com.android.server.am.ActivityStack.ActivityState)

Example 5 with ActivityState

use of com.android.server.am.ActivityStack.ActivityState in project android_frameworks_base by crdroidandroid.

the class ActivityStackSupervisor method validateTopActivitiesLocked.

void validateTopActivitiesLocked() {
    for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
        final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityRecord r = stack.topRunningActivityLocked();
            final ActivityState state = r == null ? DESTROYED : r.state;
            if (isFocusedStack(stack)) {
                if (r == null)
                    Slog.e(TAG, "validateTop...: null top activity, stack=" + stack);
                else {
                    final ActivityRecord pausing = stack.mPausingActivity;
                    if (pausing != null && pausing == r)
                        Slog.e(TAG, "validateTop...: top stack has pausing activity r=" + r + " state=" + state);
                    if (state != INITIALIZING && state != RESUMED)
                        Slog.e(TAG, "validateTop...: activity in front not resumed r=" + r + " state=" + state);
                }
            } else {
                final ActivityRecord resumed = stack.mResumedActivity;
                if (resumed != null && resumed == r)
                    Slog.e(TAG, "validateTop...: back stack has resumed activity r=" + r + " state=" + state);
                if (r != null && (state == INITIALIZING || state == RESUMED))
                    Slog.e(TAG, "validateTop...: activity in back resumed r=" + r + " state=" + state);
            }
        }
    }
}
Also used : ActivityState(com.android.server.am.ActivityStack.ActivityState)

Aggregations

ActivityState (com.android.server.am.ActivityStack.ActivityState)5