|
@@ -10,9 +10,14 @@ import android.view.ViewGroup;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
+import androidx.annotation.Nullable;
|
|
|
+import androidx.appcompat.app.AppCompatActivity;
|
|
|
+
|
|
|
import com.epson.mobilephone.common.license.SimpleMessageDialogFragment;
|
|
|
|
|
|
import epson.common.Constants;
|
|
|
+import epson.print.R;
|
|
|
|
|
|
public class LicenseTopActivity extends AppCompatActivity implements SimpleMessageDialogFragment.DialogCallback {
|
|
|
private static final String DIALOG_ID = "dialog";
|
|
@@ -29,23 +34,23 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
|
|
|
|
|
|
protected void onCreate(Bundle bundle) {
|
|
|
super.onCreate(bundle);
|
|
|
- setContentView(C1066R.layout.activity_license_top);
|
|
|
- ((ViewGroup) findViewById(C1066R.C1068id.licenseViewGroup)).setOnClickListener(new View.OnClickListener() {
|
|
|
+ setContentView(R.layout.activity_license_top);
|
|
|
+ ((ViewGroup) findViewById(R.id.licenseViewGroup)).setOnClickListener(new View.OnClickListener() {
|
|
|
public void onClick(View view) {
|
|
|
LicenseTopActivity.this.startDocumentDisplayActivity(1);
|
|
|
}
|
|
|
});
|
|
|
- ((ViewGroup) findViewById(C1066R.C1068id.privacyStatementViewGroup)).setOnClickListener(new View.OnClickListener() {
|
|
|
+ ((ViewGroup) findViewById(R.id.privacyStatementViewGroup)).setOnClickListener(new View.OnClickListener() {
|
|
|
public void onClick(View view) {
|
|
|
LicenseTopActivity.this.startDocumentDisplayActivity(2);
|
|
|
}
|
|
|
});
|
|
|
- ((Button) findViewById(C1066R.C1068id.agreeButton)).setOnClickListener(new View.OnClickListener() {
|
|
|
+ ((Button) findViewById(R.id.agreeButton)).setOnClickListener(new View.OnClickListener() {
|
|
|
public void onClick(View view) {
|
|
|
LicenseTopActivity.this.onAgree();
|
|
|
}
|
|
|
});
|
|
|
- ((Button) findViewById(C1066R.C1068id.disagreeButton)).setOnClickListener(new View.OnClickListener() {
|
|
|
+ ((Button) findViewById(R.id.disagreeButton)).setOnClickListener(new View.OnClickListener() {
|
|
|
public void onClick(View view) {
|
|
|
LicenseTopActivity.this.onDisagree();
|
|
|
}
|
|
@@ -55,7 +60,7 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
|
|
|
finish();
|
|
|
return;
|
|
|
}
|
|
|
- ((TextView) findViewById(C1066R.C1068id.appNameText)).setText(mLicenseInfo.getApplicationName(this));
|
|
|
+ ((TextView) findViewById(R.id.appNameText)).setText(mLicenseInfo.getApplicationName(this));
|
|
|
if (bundle == null) {
|
|
|
showLicenseChangeDialogIfNeeded(this, mLicenseInfo, mUserSurveyInfo);
|
|
|
}
|
|
@@ -77,13 +82,13 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
|
|
|
String str;
|
|
|
switch (licenseInfo.getLicenseAgreement(context)) {
|
|
|
case 0:
|
|
|
- str = getString(C1066R.string.EULA_Title) + Constants.BREAK_LINE + getString(C1066R.string.Privacy_Statement_Title);
|
|
|
+ str = getString(R.string.EULA_Title) + Constants.BREAK_LINE + getString(R.string.Privacy_Statement_Title);
|
|
|
break;
|
|
|
case 1:
|
|
|
- str = getString(C1066R.string.EULA_Title);
|
|
|
+ str = getString(R.string.EULA_Title);
|
|
|
break;
|
|
|
case 2:
|
|
|
- str = getString(C1066R.string.Privacy_Statement_Title);
|
|
|
+ str = getString(R.string.Privacy_Statement_Title);
|
|
|
break;
|
|
|
case 3:
|
|
|
setResult(-1);
|
|
@@ -97,7 +102,7 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
|
|
|
default:
|
|
|
return;
|
|
|
}
|
|
|
- SimpleMessageDialogFragment.newInstance(getString(C1066R.string.Update_Message) + Constants.BREAK_LINE + str, 1).show(getSupportFragmentManager(), DIALOG_ID);
|
|
|
+ SimpleMessageDialogFragment.newInstance(getString(R.string.Update_Message) + Constants.BREAK_LINE + str, 1).show(getSupportFragmentManager(), DIALOG_ID);
|
|
|
}
|
|
|
|
|
|
private void onAgree() {
|
|
@@ -127,7 +132,7 @@ public class LicenseTopActivity extends AppCompatActivity implements SimpleMessa
|
|
|
}
|
|
|
|
|
|
private void onDisagree() {
|
|
|
- SimpleMessageDialogFragment.newInstance(getString(C1066R.string.Disagree_License_Button_Message), 2).show(getSupportFragmentManager(), DIALOG_ID);
|
|
|
+ SimpleMessageDialogFragment.newInstance(getString(R.string.Disagree_License_Button_Message), 2).show(getSupportFragmentManager(), DIALOG_ID);
|
|
|
}
|
|
|
|
|
|
private void startDocumentDisplayActivity(int i) {
|