File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
app/src/main/java/com/samsung/microbit/ui/activity Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ private enum PAIRING_STATE {
155
155
public final static String ACTION_RESET_TO_BLE = "com.samsung.microbit.ACTION_RESET_TO_BLE" ;
156
156
public final static String ACTION_PAIR_BEFORE_FLASH = "com.samsung.microbit.ACTION_PAIR_BEFORE_FLASH" ;
157
157
158
- private String inAction = null ;
158
+ private String inAction = "" ;
159
159
160
160
@ Override
161
161
protected void onNewIntent (Intent intent ) {
@@ -167,15 +167,16 @@ protected void onNewIntent(Intent intent) {
167
167
168
168
private void handleIncomingIntent (Intent intent ) {
169
169
inAction = intent .getAction ();
170
- if ( inAction != null ) {
171
- if ( inAction .equals (ACTION_RESET_TO_BLE )) {
172
- resetToBLEStart ();
173
- return ;
174
- }
175
- if ( inAction .equals (ACTION_PAIR_BEFORE_FLASH )) {
176
- pairBeforeFlashStart ();
177
- return ;
178
- }
170
+ if ( inAction == null ) {
171
+ inAction = "" ;
172
+ }
173
+ if ( inAction .equals (ACTION_RESET_TO_BLE )) {
174
+ resetToBLEStart ();
175
+ return ;
176
+ }
177
+ if ( inAction .equals (ACTION_PAIR_BEFORE_FLASH )) {
178
+ pairBeforeFlashStart ();
179
+ return ;
179
180
}
180
181
}
181
182
@@ -184,7 +185,7 @@ private void resetToBLEStart() {
184
185
}
185
186
186
187
private void resetToBLEFinish ( int resultCode ) {
187
- inAction = null ;
188
+ inAction = "" ;
188
189
setResult ( resultCode );
189
190
finish ();
190
191
}
@@ -194,7 +195,7 @@ private void pairBeforeFlashStart() {
194
195
}
195
196
196
197
private void pairBeforeFlashFinish ( int resultCode ) {
197
- inAction = null ;
198
+ inAction = "" ;
198
199
setResult ( resultCode );
199
200
finish ();
200
201
}
You can’t perform that action at this time.
0 commit comments