Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
9c15ff77
Commit
9c15ff77
authored
1 year ago
by
Junyu Lai
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove sdk level check when calling getDataSaverEnabled" into main
parents
fea003bd
8df4b700
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
framework/src/android/net/BpfNetMapsReader.java
+0
-8
0 additions, 8 deletions
framework/src/android/net/BpfNetMapsReader.java
tests/unit/java/android/net/BpfNetMapsReaderTest.kt
+0
-1
0 additions, 1 deletion
tests/unit/java/android/net/BpfNetMapsReaderTest.kt
with
0 additions
and
9 deletions
framework/src/android/net/BpfNetMapsReader.java
+
0
−
8
View file @
9c15ff77
...
...
@@ -36,7 +36,6 @@ import android.os.Build;
import
android.os.ServiceSpecificException
;
import
android.system.ErrnoException
;
import
android.system.Os
;
import
android.util.Log
;
import
com.android.internal.annotations.VisibleForTesting
;
import
com.android.modules.utils.build.SdkLevel
;
...
...
@@ -278,13 +277,6 @@ public class BpfNetMapsReader {
public
boolean
getDataSaverEnabled
()
{
throwIfPreT
(
"getDataSaverEnabled is not available on pre-T devices"
);
// Note that this is not expected to be called until V given that it relies on the
// counterpart platform solution to set data saver status to bpf.
// See {@code NetworkManagementService#setDataSaverModeEnabled}.
if
(!
SdkLevel
.
isAtLeastV
())
{
Log
.
wtf
(
TAG
,
"getDataSaverEnabled is not expected to be called on pre-V devices"
);
}
try
{
return
mDataSaverEnabledMap
.
getValue
(
DATA_SAVER_ENABLED_KEY
).
val
==
DATA_SAVER_ENABLED
;
}
catch
(
ErrnoException
e
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/unit/java/android/net/BpfNetMapsReaderTest.kt
+
0
−
1
View file @
9c15ff77
...
...
@@ -213,7 +213,6 @@ class BpfNetMapsReaderTest {
assertFalse
(
isUidNetworkingBlocked
(
TEST_UID3
))
}
@IgnoreUpTo
(
VERSION_CODES
.
UPSIDE_DOWN_CAKE
)
@Test
fun
testGetDataSaverEnabled
()
{
testDataSaverEnabledMap
.
updateEntry
(
DATA_SAVER_ENABLED_KEY
,
U8
(
DATA_SAVER_DISABLED
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment