40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.google.zxing.client.android;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Bundle;
|
|
import android.view.KeyEvent;
|
|
import android.webkit.WebView;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class HelpActivity extends Activity {
|
|
private static final String b = "file:///android_asset/html-" + LocaleManager.c() + '/';
|
|
private WebView a;
|
|
|
|
@Override // android.app.Activity
|
|
protected void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
setContentView(R$layout.help);
|
|
this.a = (WebView) findViewById(R$id.help_contents);
|
|
if (bundle != null) {
|
|
this.a.restoreState(bundle);
|
|
return;
|
|
}
|
|
this.a.loadUrl(b + "index.html");
|
|
}
|
|
|
|
@Override // android.app.Activity, android.view.KeyEvent.Callback
|
|
public boolean onKeyDown(int i, KeyEvent keyEvent) {
|
|
if (i != 4 || !this.a.canGoBack()) {
|
|
return super.onKeyDown(i, keyEvent);
|
|
}
|
|
this.a.goBack();
|
|
return true;
|
|
}
|
|
|
|
@Override // android.app.Activity
|
|
protected void onSaveInstanceState(Bundle bundle) {
|
|
super.onSaveInstanceState(bundle);
|
|
this.a.saveState(bundle);
|
|
}
|
|
}
|