OSDN Git Service

Launcher restore state fixes:
authorSunny Goyal <sunnygoyal@google.com>
Mon, 22 Aug 2016 23:00:03 +0000 (16:00 -0700)
committerSunny Goyal <sunnygoyal@google.com>
Tue, 6 Sep 2016 22:24:36 +0000 (15:24 -0700)
commit2100c78bd903456a11a0ed03602419b21f6a2766
tree371efdeab60e16b9510003d7f6479c3c147b78bb
parent45b9fd280a6b74dd96c4d1d3cf635a47e1215eae
Launcher restore state fixes:

> Creating PendingRequestArgs to store generic request info across
activity instances
> Storing the CALL_PHONE request in PendingRequestArgs

> Handling onActivityResult only after the workspace has loaded.
onActivityResult sometimes modifies launcher db when removing empty
screens, and any add action is also deferred until bindComplete.
This simplifies this logic.

> Always binding the restored page irrespective of pending result.
Before starting a request activity (bind widget permission, or
widget config activity or shortcut picker), workspace commits the
pending screen id to the DB. Hence the restore page is valid when
restore is called (onResume loads with currentPage instead of
restored page)

Bug: 28573143
Change-Id: I34be603cbeb2145f5caf0d18e016f50029e07df8
src/com/android/launcher3/Launcher.java
src/com/android/launcher3/util/ActivityResultInfo.java [new file with mode: 0644]
src/com/android/launcher3/util/PendingRequestArgs.java [new file with mode: 0644]