Fix crash when switching between Apps/Widgets tabs

Bug: 8138894
Change-Id: I8a4e62fad36d9db1dd289b1c56b42fea083012ac