code: public void register(Context context) {
          if (mRegisteredContext != null) {
              throw new IllegalStateException("Already registered");
          }
  
          mRegisteredContext = context;
          context.registerReceiver(this, mPackageFilter);
      }
docs: Register this monitor via the given <code>context</code>. Throws an
  {@link IllegalStateException} if this monitor was already registered.