mirror of
https://github.com/zxing/zxing.git
synced 2025-01-27 11:01:00 -08:00
Avoid NPE on null action
git-svn-id: https://zxing.googlecode.com/svn/trunk@2262 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
9ad25e25b7
commit
6573f932a1
|
@ -63,16 +63,17 @@ public final class EncodeActivity extends Activity {
|
|||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
if (intent == null) {
|
||||
finish();
|
||||
} else {
|
||||
String action = intent.getAction();
|
||||
if (action.equals(Intents.Encode.ACTION) || action.equals(Intent.ACTION_SEND)) {
|
||||
if (Intents.Encode.ACTION.equals(action) || Intent.ACTION_SEND.equals(action)) {
|
||||
setContentView(R.layout.encode);
|
||||
return;
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue