diff options
Diffstat (limited to 'src/com/android/settings/DataUsageSummary.java')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 0d003b3..62c86d8 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -76,6 +76,7 @@ import android.net.NetworkStats; import android.net.NetworkStatsHistory; import android.net.NetworkTemplate; import android.net.TrafficStats; +import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.INetworkManagementService; @@ -478,6 +479,18 @@ public class DataUsageSummary extends Fragment { } else { metered.setVisible(false); } + + final MenuItem help = menu.findItem(R.id.data_usage_menu_help); + String helpUrl; + if (!TextUtils.isEmpty(helpUrl = getResources().getString(R.string.help_url_data_usage))) { + Intent helpIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(helpUrl)); + helpIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + help.setIntent(helpIntent); + help.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + } else { + help.setVisible(false); + } } @Override |