Don't allow renaming top level directory to another top level directory

We shouldn't allow renaming top level directory to another top level
directory for non-legacy apps. Even though this was the intended
behavior, we failed enforcing this restriction because of incorrect
nesting of "if" and "else if" statements. This Cl corrects the nesting
of "if" and "else if" to enforce the restrictions correctly on both old
and new path.

Bug: 159913101
Test: atest ScopedStorageHostTest#testCantRenameToTopLevelDirectory
Change-Id: I41bac778162483cd8d7825b491d90d5698d02d1d
1 file changed