Fix touch reset due to viewport isActive changing when enableForInactiveViewport is 1

Test: Manual, and added unit test
Bug: 267543995
Change-Id: Icb76efe7568728172ed16246356cea3fbfef151d
2 files changed