[Verizon Droid Charge] substanceD:
In the Amazon Appstore apk, com.amazon.mas.client.framework.net contains a class called NetworkStateManager whose source is:

package com.amazon.mas.client.framework.net;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager.WifiLock;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class NetworkStateManager
{
private static final int DELAY_DROP_DETECTION = 5000;
private static final String TAG = "NetworkStateManager";
private static final Map<String, WifiManager.WifiLock> wifiLocks = new ConcurrentHashMap();
private final ConnectivityManager connectivityManager;
private final WeakReference<Context> context;
private final Handler delayHandler;
private final List<NetworkStateListener> listeners = new ArrayList();
private boolean networkDropDetected = false;
private NetworkStateReceiver receiver = null;
private boolean wasConnected = false;
private final WifiManager wifiManager;

public NetworkStateManager(Context paramContext)
{
this.context = new WeakReference(paramContext);
this.wifiManager = ((WifiManager)paramContext.getSystemService("wifi"));
this.connectivityManager = ((ConnectivityManager)paramContext.getSystemService("connectivity"));
this.delayHandler = new NetworkStateHandler(null);
if (isNetworkConnected());
for (boolean bool = false; ; bool = true)
{
this.networkDropDetected = bool;
return;
}
}

private WifiManager.WifiLock getWifiLock(String paramString)
{
if (wifiLocks.containsKey(paramString));
for (WifiManager.WifiLock localWifiLock = (WifiManager.WifiLock)wifiLocks.get(paramString); ; localWifiLock = this.wifiManager.createWifiLock(paramString))
return localWifiLock;
}

public boolean acquireWifiLock(String paramString)
{
WifiManager.WifiLock localWifiLock = getWifiLock(paramString);
if (localWifiLock.isHeld())
Log.w("NetworkStateManager", "Wifi lock identified by " + paramString + " already acquired");
for (int i = 0; ; i = 1)
{
return i;
localWifiLock.acquire();
wifiLocks.put(paramString, localWifiLock);
}
}

public void addListener(NetworkStateListener paramNetworkStateListener)
{
if (!this.listeners.contains(paramNetworkStateListener))
this.listeners.add(paramNetworkStateListener);
}

public void clearListeners()
{
this.listeners.clear();
}

public boolean isNetworkConnected()
{
NetworkInfo localNetworkInfo = this.connectivityManager.getActiveNetworkInfo();
if ((localNetworkInfo == null) || (!localNetworkInfo.isConnected()));
for (int i = 0; ; i = 1)
return i;
}

public boolean isNetworkWifi()
{
return this.connectivityManager.getNetworkInfo(1).isConnected();
}

public boolean isWifiLockAcquired(String paramString)
{
WifiManager.WifiLock localWifiLock = getWifiLock(paramString);
if ((localWifiLock != null) && (localWifiLock.isHeld()));
for (int i = 1; ; i = 0)
return i;
}

public void releaseWifiLock(String paramString)
{
WifiManager.WifiLock localWifiLock = getWifiLock(paramString);
if (localWifiLock.isHeld())
{
localWifiLock.release();
if (wifiLocks.containsKey(paramString))
wifiLocks.remove(paramString);
}
while (true)
{
return;
Log.w("NetworkStateManager", "Wifi lock identified by " + paramString + " is not acquired");
}
}

public void removeListener(NetworkStateListener paramNetworkStateListener)
{
this.listeners.remove(paramNetworkStateListener);
}

public void startListening()
{
Context localContext = (Context)this.context.get();
if (this.receiver != null)
Log.w("NetworkStateManager", "Already listening, duplicate call to NetworkStateManager#startListening");
while (true)
{
return;
if (localContext == null)
{
Log.w("NetworkStateManager", "Call to NetworkStateManager#startListening on null context");
continue;
}
this.wasConnected = isNetworkConnected();
IntentFilter localIntentFilter = new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE");
this.receiver = new NetworkStateReceiver(null);
localContext.registerReceiver(this.receiver, localIntentFilter);
}
}

public void stopListening()
{
Context localContext = (Context)this.context.get();
if (this.receiver == null)
Log.w("NetworkStateManager", "Not listening, invalid call to NetworkStateManager#stopListening");
while (true)
{
return;
if (localContext == null)
{
Log.w("NetworkStateManager", "Call to NetworkStateManager#stopListening on null context");
continue;
}
localContext.unregisterReceiver(this.receiver);
this.receiver = null;
this.delayHandler.removeMessages(65536);
}
}

private class NetworkStateHandler extends Handler
{
public static final int MSG_NETWORK_DROP = 65536;

private NetworkStateHandler()
{
}

public void handleMessage(Message paramMessage)
{
switch (paramMessage.what)
{
default:
super.handleMessage(paramMessage);
case 65536:
}
while (true)
{
return;
NetworkStateManager.this.wasConnected = false;
NetworkStateManager.this.networkDropDetected = true;
Iterator localIterator = NetworkStateManager.this.listeners.iterator();
while (localIterator.hasNext())
((NetworkStateManager.NetworkStateListener)localIterator.next()).onConnectivityLost();
}
}
}

public static abstract interface NetworkStateListener
{
public abstract void onConnectivityLost();

public abstract void onConnectivityRestored();
}

private class NetworkStateReceiver extends BroadcastReceiver
{
private NetworkStateReceiver()
{
}

public void onReceive(Context paramContext, Intent paramIntent)
{
if ((paramContext == null) || (paramIntent == null) || (!"android.net.conn.CONNECTIVITY_CHANGE".equals(paramIntent.getAction())));
while (true)
{
return;
if (NetworkStateManager.this.isNetworkConnected());
for (int i = 0; ; i = 1)
{
boolean bool = paramIntent.getBooleanExtra("isFailover", false);
if ((i == 0) || (bool) || (!NetworkStateManager.this.wasConnected))
break label99;
Message localMessage = NetworkStateManager.this.delayHandler.obtainMessage(65536);
NetworkStateManager.this.delayHandler.sendMessageDelayed(localMessage, 5000L);
break;
}
label99: if (i != 0)
continue;
if (NetworkStateManager.this.delayHandler.hasMessages(65536))
NetworkStateManager.this.delayHandler.removeMessages(65536);
if (!NetworkStateManager.this.networkDropDetected)
continue;
NetworkStateManager.this.wasConnected = true;
Iterator localIterator = NetworkStateManager.this.listeners.iterator();
while (localIterator.hasNext())
((NetworkStateManager.NetworkStateListener)localIterator.next()).onConnectivityRestored();
}
}
}
}

I'm guessing that making isNetworkWifi() return true would allow for downloads of large files over the cell network. I might repack the APK and post it here if I find the time.