Merge "Remove special handling for legacy apps when checking permission."