Smartphone giant Xiaomi Corp. has agreed to find a settlement that would see it removed from a U.S. Defense Department blacklist, representing a rare reversal of a Trump-era action that could have limited the company’s access to global capital markets.