Update the initialization timeline for the Godot fragment to be more consistent with the previous activity based timeline.
(cherry picked from commit 3ce7678374
)
This commit is contained in:
parent
9fb5215db5
commit
65eb5fdf1e
1 changed files with 26 additions and 16 deletions
|
@ -575,7 +575,9 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
|
super.onCreate(icicle);
|
||||||
|
|
||||||
final Activity activity = getActivity();
|
final Activity activity = getActivity();
|
||||||
Window window = activity.getWindow();
|
Window window = activity.getWindow();
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
|
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
|
||||||
|
@ -687,10 +689,26 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||||
|
|
||||||
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
|
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
|
||||||
// This is where you do set up to display the download
|
// This is where you do set up to display the download
|
||||||
// progress (next step)
|
// progress (next step in onCreateView)
|
||||||
mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this,
|
mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this,
|
||||||
GodotDownloaderService.class);
|
GodotDownloaderService.class);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (NameNotFoundException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mCurrentIntent = activity.getIntent();
|
||||||
|
|
||||||
|
initializeGodot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
|
||||||
|
if (mDownloaderClientStub != null) {
|
||||||
View downloadingExpansionView =
|
View downloadingExpansionView =
|
||||||
inflater.inflate(R.layout.downloading_expansion, container, false);
|
inflater.inflate(R.layout.downloading_expansion, container, false);
|
||||||
mPB = (ProgressBar)downloadingExpansionView.findViewById(R.id.progressBar);
|
mPB = (ProgressBar)downloadingExpansionView.findViewById(R.id.progressBar);
|
||||||
|
@ -706,15 +724,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
||||||
|
|
||||||
return downloadingExpansionView;
|
return downloadingExpansionView;
|
||||||
}
|
}
|
||||||
} catch (NameNotFoundException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mCurrentIntent = activity.getIntent();
|
|
||||||
|
|
||||||
initializeGodot();
|
|
||||||
return containerLayout;
|
return containerLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue