public static void registerClient(Context context, String origin, String clientPackage) {
        Set<String> possiblePackages = getVerifiedPackages(context, origin);
        possiblePackages.add(clientPackage);

        // sSharedPreferences won't be null after a call to getVerifiedPackages.
        SharedPreferences.Editor editor = sSharedPreferences.get().edit();
        editor.putStringSet(origin, possiblePackages);
        editor.apply();
    }
Registers (and persists) a package to be used for an origin. This information is persisted
in SharedPreferences. Although this method can be called on any thread, it may read
SharedPreferences and hit the disk, so call it on a background thread if possible.
@param context A Context to access SharedPreferences.
@param origin The origin for which the package is relevant.
@param clientPackage The packages to register.
customtabs/src/android/support/customtabs/trusted/TrustedWebActivityServiceConnectionManager.java