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 {
155155 public final static String ACTION_RESET_TO_BLE = "com.samsung.microbit.ACTION_RESET_TO_BLE" ;
156156 public final static String ACTION_PAIR_BEFORE_FLASH = "com.samsung.microbit.ACTION_PAIR_BEFORE_FLASH" ;
157157
158- private String inAction = null ;
158+ private String inAction = "" ;
159159
160160 @ Override
161161 protected void onNewIntent (Intent intent ) {
@@ -167,15 +167,16 @@ protected void onNewIntent(Intent intent) {
167167
168168 private void handleIncomingIntent (Intent intent ) {
169169 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 ;
179180 }
180181 }
181182
@@ -184,7 +185,7 @@ private void resetToBLEStart() {
184185 }
185186
186187 private void resetToBLEFinish ( int resultCode ) {
187- inAction = null ;
188+ inAction = "" ;
188189 setResult ( resultCode );
189190 finish ();
190191 }
@@ -194,7 +195,7 @@ private void pairBeforeFlashStart() {
194195 }
195196
196197 private void pairBeforeFlashFinish ( int resultCode ) {
197- inAction = null ;
198+ inAction = "" ;
198199 setResult ( resultCode );
199200 finish ();
200201 }
You can’t perform that action at this time.
0 commit comments