Japan’s parliament enacts a law to promote competition in smartphone app stores by restricting tech giants Apple Inc. and Google LLC from limiting third-party companies from selling and operating apps on their platforms.