forked from organicmaps/organicmaps
[android] Refactored dispatchIntent method
This commit is contained in:
parent
589b995911
commit
793c80128f
1 changed files with 10 additions and 6 deletions
|
@ -230,7 +230,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||
return;
|
||||
}
|
||||
|
||||
dispatchIntent();
|
||||
mMapTaskToForward = processIntent();
|
||||
showMap();
|
||||
}
|
||||
|
||||
|
@ -482,21 +482,25 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void dispatchIntent()
|
||||
@Nullable
|
||||
private MapTask processIntent()
|
||||
{
|
||||
final Intent intent = getIntent();
|
||||
if (intent == null)
|
||||
return;
|
||||
return null;
|
||||
|
||||
final Intent extra = intent.getParcelableExtra(SplashActivity.EXTRA_INTENT);
|
||||
if (extra == null)
|
||||
return;
|
||||
return null;
|
||||
|
||||
MapTask mapTaskToForward;
|
||||
for (IntentProcessor ip : mIntentProcessors)
|
||||
{
|
||||
if (ip.isSupported(extra) && (mMapTaskToForward = ip.process(extra)) != null)
|
||||
break;
|
||||
if (ip.isSupported(extra) && (mapTaskToForward = ip.process(extra)) != null)
|
||||
return mapTaskToForward;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static native int nativeGetBytesToDownload();
|
||||
|
|
Loading…
Add table
Reference in a new issue