Treat no profile the same as empty profile for app image generation

Prevent cases where a full app image gets generated since this should
be avoided for performance reasons.

Bug: 77340429
Test: test-art-host-gtest

(cherry picked from commit f85b3db7f63ef915bb48439c5f8ca34113bd524b)

Merged-In: Ib320fa7c56b4bf78af0df823a06b6881e6af7103
Change-Id: Iafd4b083362792da6c3b4c385fbcb3627e9c342a
2 files changed