TrivialDriveJava/app/src/main/java/com/sample/android/trivialdrivesample/ui/MainActivity.java [82:110]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            snackbar.show();
        });
        // Allows billing to refresh purchases during onResume
        getLifecycle().addObserver(mainActivityViewModel.getBillingLifecycleObserver());

        // A helpful hint to prevent confusion when billing transactions silently fail
        if ( BuildConfig.BASE64_ENCODED_PUBLIC_KEY.equals("null")) {
            if ( getSupportFragmentManager()
                    .findFragmentByTag(PublicKeyNotSetDialog.DIALOG_TAG) == null ) {
                new PublicKeyNotSetDialog()
                        .show(getSupportFragmentManager(), PublicKeyNotSetDialog.DIALOG_TAG);
            }
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.activity_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // we could nicely disable this when we don't have a premium purchase by observing
        // the LiveData for the SKU_GAS, but it's just there for testing
        if (item.getItemId() == R.id.menu_consume_premium) {
            mainActivityViewModel.debugConsumePremium();
            return true;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



TrivialDriveKotlin/app/src/main/java/com/sample/android/trivialdrivesample/ui/MainActivity.java [82:111]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            snackbar.show();
        });
        // Allows billing to refresh purchases during onResume
        getLifecycle().addObserver(mainActivityViewModel.getBillingLifecycleObserver());

        // A helpful hint to prevent confusion when billing transactions silently fail
        if ( BuildConfig.BASE64_ENCODED_PUBLIC_KEY.equals("null")) {
            if ( getSupportFragmentManager()
                    .findFragmentByTag(PublicKeyNotSetDialog.DIALOG_TAG) == null ) {
                new PublicKeyNotSetDialog()
                        .show(getSupportFragmentManager(), PublicKeyNotSetDialog.DIALOG_TAG);
            }
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.activity_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        // we could nicely disable this when we don't have a premium purchase by observing
        // the LiveData for the SKU_GAS, but it's just there for testing
        if (item.getItemId() == R.id.menu_consume_premium) {
            mainActivityViewModel.debugConsumePremium();
            return true;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



