Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
e07281f0
Commit
e07281f0
authored
2 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Make PCC indication logic consistent between HIDL and AIDL"
parents
49abc6fe
240bd841
No related branches found
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/PhysicalChannelConfig.java
+12
-22
12 additions, 22 deletions
telephony/java/android/telephony/PhysicalChannelConfig.java
with
12 additions
and
22 deletions
telephony/java/android/telephony/PhysicalChannelConfig.java
+
12
−
22
View file @
e07281f0
...
...
@@ -23,16 +23,12 @@ import android.os.Parcel;
import
android.os.Parcelable
;
import
android.telephony.Annotation.NetworkType
;
import
com.android.telephony.Rlog
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.util.Arrays
;
import
java.util.Objects
;
public
final
class
PhysicalChannelConfig
implements
Parcelable
{
static
final
String
TAG
=
"PhysicalChannelConfig"
;
// TODO(b/72993578) consolidate these enums in a central location.
/** @hide */
@Retention
(
RetentionPolicy
.
SOURCE
)
...
...
@@ -571,21 +567,19 @@ public final class PhysicalChannelConfig implements Parcelable {
public
@NonNull
Builder
setNetworkType
(
@NetworkType
int
networkType
)
{
if
(!
TelephonyManager
.
isNetworkTypeValid
(
networkType
))
{
Rlog
.
e
(
TAG
,
"Builder.setNetworkType: Network type "
+
networkType
+
" is invalid."
);
}
else
{
mNetworkType
=
networkType
;
throw
new
IllegalArgumentException
(
"Network type "
+
networkType
+
" is invalid."
);
}
mNetworkType
=
networkType
;
return
this
;
}
public
@NonNull
Builder
setFrequencyRange
(
int
frequencyRange
)
{
if
(!
ServiceState
.
isFrequencyRangeValid
(
frequencyRange
)
&&
frequencyRange
!=
ServiceState
.
FREQUENCY_RANGE_UNKNOWN
)
{
Rlog
.
e
(
TAG
,
"Builder.setFrequencyRange:
Frequency range "
+
frequencyRange
throw
new
IllegalArgumentException
(
"
Frequency range "
+
frequencyRange
+
" is invalid."
);
}
else
{
mFrequencyRange
=
frequencyRange
;
}
mFrequencyRange
=
frequencyRange
;
return
this
;
}
...
...
@@ -601,21 +595,19 @@ public final class PhysicalChannelConfig implements Parcelable {
public
@NonNull
Builder
setCellBandwidthDownlinkKhz
(
int
cellBandwidthDownlinkKhz
)
{
if
(
cellBandwidthDownlinkKhz
<
CELL_BANDWIDTH_UNKNOWN
)
{
Rlog
.
e
(
TAG
,
"Builder.setCellBandwidthDownlinkKhz:
Cell downlink bandwidth(kHz) "
throw
new
IllegalArgumentException
(
"
Cell downlink bandwidth(kHz) "
+
cellBandwidthDownlinkKhz
+
" is invalid."
);
}
else
{
mCellBandwidthDownlinkKhz
=
cellBandwidthDownlinkKhz
;
}
mCellBandwidthDownlinkKhz
=
cellBandwidthDownlinkKhz
;
return
this
;
}
public
@NonNull
Builder
setCellBandwidthUplinkKhz
(
int
cellBandwidthUplinkKhz
)
{
if
(
cellBandwidthUplinkKhz
<
CELL_BANDWIDTH_UNKNOWN
)
{
Rlog
.
e
(
TAG
,
"Builder.setCellBandwidthUplinkKhz:
Cell uplink bandwidth(kHz) "
throw
new
IllegalArgumentException
(
"
Cell uplink bandwidth(kHz) "
+
cellBandwidthUplinkKhz
+
" is invalid."
);
}
else
{
mCellBandwidthUplinkKhz
=
cellBandwidthUplinkKhz
;
}
mCellBandwidthUplinkKhz
=
cellBandwidthUplinkKhz
;
return
this
;
}
...
...
@@ -632,20 +624,18 @@ public final class PhysicalChannelConfig implements Parcelable {
public
@NonNull
Builder
setPhysicalCellId
(
int
physicalCellId
)
{
if
(
physicalCellId
>
PHYSICAL_CELL_ID_MAXIMUM_VALUE
)
{
Rlog
.
e
(
TAG
,
"Builder.setPhysicalCellId:
Physical cell ID "
+
physicalCellId
throw
new
IllegalArgumentException
(
"
Physical cell ID "
+
physicalCellId
+
" is over limit."
);
}
else
{
mPhysicalCellId
=
physicalCellId
;
}
mPhysicalCellId
=
physicalCellId
;
return
this
;
}
public
@NonNull
Builder
setBand
(
int
band
)
{
if
(
band
<=
BAND_UNKNOWN
)
{
Rlog
.
e
(
TAG
,
"Builder.setBand: Band "
+
band
+
" is invalid."
);
}
else
{
mBand
=
band
;
throw
new
IllegalArgumentException
(
"Band "
+
band
+
" is invalid."
);
}
mBand
=
band
;
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