Fix null pointer in dashboard fragment test.

- use context instead of activity to retrieve resource details.
- revert the change previously made in getActivity() calls.
- add null checking in package name and tile intent.

Fix: 34396855
Test: make RunSettingsRoboTests

Change-Id: Ic853939fee3c381b663c0320354da51d3b2a0e11
2 files changed