private void ProcessUpdateInfo(AndroidJavaObject javaAppUpdateInfo) { // Parsing AppUpdateInfo java object as an AppUpdateState since AppUpdateInfo contains all the fields for // an AppUpdateState. var updateState = new AppUpdateState(javaAppUpdateInfo); OnStateUpdateEvent.Invoke(updateState); }
private void OnStateUpdateReceived(AssetPackState newState) { if (_gettingPackStates) { _stateUpdatesSinceGetPackStates.Add(newState.Name); } OnStateUpdateEvent.Invoke(newState); }
/// <summary> /// Processes a java AssetPackStates object and invokes <see cref="OnForcedStateUpdate"/> for each pack /// state it contains. /// </summary> /// <param name="javaPackStates">A java object representing a AssetPackStates object.</param> private void ProcessPackStates(AndroidJavaObject javaPackStates) { try { var packStates = new AssetPackStates(javaPackStates); foreach (var packStatePair in packStates.PackStates) { if (_stateUpdatesSinceGetPackStates.Contains(packStatePair.Key)) { // A newer state update was received before the getPackStateTask finished. // Discard this state. continue; } OnStateUpdateEvent.Invoke(packStatePair.Value); } } finally { EndGetPackStates(); } }
// Proxied java calls. Method names are camelCase to match the corresponding java methods. public void onStateUpdate(AndroidJavaObject installState) { var updateState = new AppUpdateState(installState); PlayCoreEventHandler.HandleEvent(() => OnStateUpdateEvent.Invoke(updateState)); }
private void OnStateUpdateReceived(AppUpdateState newState) { OnStateUpdateEvent.Invoke(newState); }
// Proxied java calls. Method names are camelCase to match the corresponding java methods. public void onStateUpdate(AndroidJavaObject assetPacksState) { var packState = new AssetPackState(assetPacksState); PlayCoreEventHandler.HandleEvent(() => OnStateUpdateEvent.Invoke(packState)); }