package epson.maintain.activity;

import android.os.Bundle;
import android.support.p003v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.epson.mobilephone.common.license.RestoreScrollView;
import epson.common.IprintLicenseInfo;
import epson.print.C2135R;

public class CheckEulaActivity extends AppCompatActivity {
    private static final String KEY_SCROLL_Y = "scroll_y";
    private RestoreScrollView mScrollView;

    public void onBackPressed() {
    }

    /* access modifiers changed from: protected */
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView((int) C2135R.layout.activity_check_eula);
        ((Button) findViewById(C2135R.C2137id.eulaAgreeButton)).setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                CheckEulaActivity.this.finishWithResult(-1);
            }
        });
        ((Button) findViewById(C2135R.C2137id.eulaDisagreeButton)).setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                CheckEulaActivity.this.finishWithResult(0);
            }
        });
        this.mScrollView = (RestoreScrollView) findViewById(C2135R.C2137id.eulaCheckMainScrollView);
        ((TextView) findViewById(C2135R.C2137id.eulaTextView)).setText(new IprintLicenseInfo().getDocumentString(this, 1));
        if (bundle != null) {
            this.mScrollView.setScrollY(bundle.getInt(KEY_SCROLL_Y, 0));
        }
    }

    /* access modifiers changed from: protected */
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putInt(KEY_SCROLL_Y, this.mScrollView.getLastY());
    }

    /* access modifiers changed from: private */
    public void finishWithResult(int i) {
        setResult(i);
        finish();
    }
}
