Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Browser
Commits
7b182d70
Commit
7b182d70
authored
13 years ago
by
John Reck
Browse files
Options
Download
Email Patches
Plain Diff
Handle MANAGE_NETWORK_USAGE intent
Bug: 4726553 Change-Id: I790ff56ae0dceb742a225d8b1edd7076997a517f
parent
180d76d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
AndroidManifest.xml
AndroidManifest.xml
+4
-0
src/com/android/browser/BrowserPreferencesPage.java
src/com/android/browser/BrowserPreferencesPage.java
+20
-2
No files found.
AndroidManifest.xml
View file @
7b182d70
...
...
@@ -162,6 +162,10 @@
</activity>
<activity
android:name=
"BrowserPreferencesPage"
android:label=
"@string/menu_preferences"
>
<intent-filter>
<action
android:name=
"android.intent.action.MANAGE_NETWORK_USAGE"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
</intent-filter>
</activity>
<activity
android:name=
"BookmarkSearch"
...
...
This diff is collapsed.
Click to expand it.
src/com/android/browser/BrowserPreferencesPage.java
View file @
7b182d70
...
...
@@ -16,18 +16,21 @@
package
com.android.browser
;
import
com.android.browser.preferences.DebugPreferencesFragment
;
import
android.app.ActionBar
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.preference.PreferenceActivity
;
import
android.view.MenuItem
;
import
com.android.browser.preferences.BandwidthPreferencesFragment
;
import
com.android.browser.preferences.DebugPreferencesFragment
;
import
java.util.List
;
public
class
BrowserPreferencesPage
extends
PreferenceActivity
{
public
static
final
String
CURRENT_PAGE
=
"currentPage"
;
private
List
<
Header
>
mHeaders
;
@Override
public
void
onCreate
(
Bundle
icicle
)
{
...
...
@@ -53,6 +56,21 @@ public class BrowserPreferencesPage extends PreferenceActivity {
debug
.
fragment
=
DebugPreferencesFragment
.
class
.
getName
();
target
.
add
(
debug
);
}
mHeaders
=
target
;
}
@Override
public
Header
onGetInitialHeader
()
{
String
action
=
getIntent
().
getAction
();
if
(
Intent
.
ACTION_MANAGE_NETWORK_USAGE
.
equals
(
action
))
{
String
fragName
=
BandwidthPreferencesFragment
.
class
.
getName
();
for
(
Header
h
:
mHeaders
)
{
if
(
fragName
.
equals
(
h
.
fragment
))
{
return
h
;
}
}
}
return
super
.
onGetInitialHeader
();
}
@Override
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment