hunk.code_window: import { Permissions, Notifications } from 'expo';
   const PUSH_ENDPOINT = 'https://your-server.com/users/push-token';
   async function registerForPushNotificationsAsync() {
     // Android remote notification permissions are granted during the app
     // install, so this will only ask on iOS
     let { status } = await Permissions.askAsync(Permissions.REMOTE_NOTIFICATIONS);
     // Stop here if the user did not grant permissions
  
hunk.labels: keep keep keep keep keep replace replace replace keep keep
hunk.after_edit:   const { existingStatus } = await Permissions.getAsync(Permissions.REMOTE_NOTIFICATIONS);
     let finalStatus = existingStatus;
     // only ask if permissions have not already been determined, because
     // iOS won't necessarily prompt the user a second time.
     if (existingStatus !== 'granted') {
       // Android remote notification permissions are granted during the app
       // install, so this will only ask on iOS
       const { status } = await Permissions.askAsync(Permissions.REMOTE_NOTIFICATIONS);
       finalStatus = status;
     }
  
hunk.file_path: docs/versions/v16.0.0/guides/push-notifications.md
hunk.type: replace
file: package abi32_0_0.expo.core;
  
  import android.content.Context;
  
  import java.util.ArrayList;
  import java.util.Collection;
  import java.util.List;
  
  import abi32_0_0.expo.core.interfaces.InternalModule;
  import abi32_0_0.expo.core.interfaces.Package;
  import expo.core.interfaces.SingletonModule;
  
  /**
   * Builder for {@link ModuleRegistry}. Override this class to add some custom
   * modules from outside of {@link Package} ecosystem.
   */
  public class ModuleRegistryProvider {
    private List<Package> mPackages;
  
    public ModuleRegistryProvider(List<Package> initialPackages) {
      mPackages = initialPackages;
    }
  
    protected List<Package> getPackages() {
      return mPackages;
    }
  
    public ModuleRegistry get(Context context) {
      return new ModuleRegistry(
              createInternalModules(context),
              createExportedModules(context),
              createViewManagers(context),
              createSingletonModules(context)
      );
    }
  
    public Collection<InternalModule> createInternalModules(Context context) {
      Collection<InternalModule> internalModules = new ArrayList<>();
      for (Package pkg : getPackages()) {
        internalModules.addAll(pkg.createInternalModules(context));
      }
      return internalModules;
    }
  
    public Collection<ExportedModule> createExportedModules(Context context) {
      Collection<ExportedModule> exportedModules = new ArrayList<>();
      for (Package pkg : getPackages()) {
        exportedModules.addAll(pkg.createExportedModules(context));
      }
      return exportedModules;
    }
  
    public Collection<ViewManager> createViewManagers(Context context) {
      Collection<ViewManager> viewManagers = new ArrayList<>();
      for (Package pkg : getPackages()) {
        viewManagers.addAll(pkg.createViewManagers(context));
      }
      return viewManagers;
    }
  
    public Collection<SingletonModule> createSingletonModules(Context context) {
      Collection<SingletonModule> singletonModules = new ArrayList<>();
      for (Package pkg : getPackages()) {
        singletonModules.addAll(pkg.createSingletonModules(context));
      }
      return singletonModules;
    }
  }
  