Donate to
e Foundation
|
Murena
handsets with /e/OS | Own a part of Murena!
Learn more
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
android_frameworks_base
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository 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
e
os
android_frameworks_base
Commits
31083c40
Commit
31083c40
authored
4 years ago
by
Rambo Wang
Committed by
Gerrit Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Rename SignalThresholdInfo.Builder#setThresholdUnlimited"
parents
5968a390
27be9449
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
telephony/java/android/telephony/SignalThresholdInfo.java
+11
-13
11 additions, 13 deletions
telephony/java/android/telephony/SignalThresholdInfo.java
with
11 additions
and
13 deletions
telephony/java/android/telephony/SignalThresholdInfo.java
+
11
−
13
View file @
31083c40
...
@@ -402,29 +402,27 @@ public final class SignalThresholdInfo implements Parcelable {
...
@@ -402,29 +402,27 @@ public final class SignalThresholdInfo implements Parcelable {
* @see #getThresholds() for more details on signal strength thresholds
* @see #getThresholds() for more details on signal strength thresholds
*/
*/
public
@NonNull
Builder
setThresholds
(
@NonNull
int
[]
thresholds
)
{
public
@NonNull
Builder
setThresholds
(
@NonNull
int
[]
thresholds
)
{
Objects
.
requireNonNull
(
thresholds
,
"thresholds must not be null"
);
return
setThresholds
(
thresholds
,
false
/*isSystem*/
);
if
(
thresholds
.
length
<
MINIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
||
thresholds
.
length
>
MAXIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
)
{
throw
new
IllegalArgumentException
(
"thresholds length must between "
+
MINIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
+
" and "
+
MAXIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
);
}
mThresholds
=
thresholds
.
clone
();
Arrays
.
sort
(
mThresholds
);
return
this
;
}
}
/**
/**
* Set the signal strength thresholds for the corresponding signal measurement type without
* Set the signal strength thresholds for the corresponding signal measurement type.
* the length limitation.
*
*
* @param thresholds array of integer as the signal threshold values
* @param thresholds array of integer as the signal threshold values
* @param isSystem true is the caller is system which does not have restrictions on
* the length of thresholds array.
* @return the builder to facilitate the chaining
* @return the builder to facilitate the chaining
*
*
* @hide
* @hide
*/
*/
public
@NonNull
Builder
setThresholds
Unlimited
(
@NonNull
int
[]
thresholds
)
{
public
@NonNull
Builder
setThresholds
(
@NonNull
int
[]
thresholds
,
boolean
isSystem
)
{
Objects
.
requireNonNull
(
thresholds
,
"thresholds must not be null"
);
Objects
.
requireNonNull
(
thresholds
,
"thresholds must not be null"
);
if
(!
isSystem
&&
(
thresholds
.
length
<
MINIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
||
thresholds
.
length
>
MAXIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
))
{
throw
new
IllegalArgumentException
(
"thresholds length must between "
+
MINIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
+
" and "
+
MAXIMUM_NUMBER_OF_THRESHOLDS_ALLOWED
);
}
mThresholds
=
thresholds
.
clone
();
mThresholds
=
thresholds
.
clone
();
Arrays
.
sort
(
mThresholds
);
Arrays
.
sort
(
mThresholds
);
return
this
;
return
this
;
...
...
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