Fix crashes when NFC isn't supported.
Change-Id: I638a1e4e5d7a0b5d4f84668e134b13457aeaa879
This commit is contained in:
@@ -75,7 +75,8 @@ public class ForegroundDispatch extends Activity {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, mTechLists);
|
||||
if (mAdapter != null) mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters,
|
||||
mTechLists);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,7 +88,6 @@ public class ForegroundDispatch extends Activity {
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
//mAdapter.disableForegroundDispatch(this);
|
||||
throw new RuntimeException("onPause not implemented to fix build");
|
||||
if (mAdapter != null) mAdapter.disableForegroundDispatch(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user