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
550d5554
Commit
550d5554
authored
1 year ago
by
Muralidhar Reddy Mule
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Clean up UiccPortInfo related assumptions to avoid FATAL exceptions." into udc-dev
parents
53de58a6
1f263134
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
telephony/java/android/telephony/UiccCardInfo.java
+1
-1
1 addition, 1 deletion
telephony/java/android/telephony/UiccCardInfo.java
telephony/java/android/telephony/UiccSlotInfo.java
+6
-7
6 additions, 7 deletions
telephony/java/android/telephony/UiccSlotInfo.java
with
7 additions
and
8 deletions
telephony/java/android/telephony/UiccCardInfo.java
+
1
−
1
View file @
550d5554
...
...
@@ -166,7 +166,7 @@ public final class UiccCardInfo implements Parcelable {
+
" Please Use UiccPortInfo API instead"
);
}
//always return ICCID from first port.
return
get
Port
s
().
stream
().
findFirst
()
.
get
().
getIccId
();
return
m
Port
List
.
isEmpty
()
?
null
:
mPortList
.
get
(
0
).
getIccId
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
telephony/java/android/telephony/UiccSlotInfo.java
+
6
−
7
View file @
550d5554
...
...
@@ -139,14 +139,16 @@ public class UiccSlotInfo implements Parcelable {
public
UiccSlotInfo
(
boolean
isEuicc
,
String
cardId
,
@CardStateInfo
int
cardStateInfo
,
boolean
isExtendedApduSupported
,
boolean
isRemovable
,
@NonNull
List
<
UiccPortInfo
>
portList
)
{
this
.
mIsActive
=
portList
.
get
(
0
).
isActive
();
this
.
mIsEuicc
=
isEuicc
;
this
.
mCardId
=
cardId
;
this
.
mCardStateInfo
=
cardStateInfo
;
this
.
mLogicalSlotIdx
=
portList
.
get
(
0
).
getLogicalSlotIndex
();
this
.
mIsExtendedApduSupported
=
isExtendedApduSupported
;
this
.
mIsRemovable
=
isRemovable
;
this
.
mPortList
=
portList
;
this
.
mIsActive
=
!
portList
.
isEmpty
()
&&
portList
.
get
(
0
).
isActive
();
this
.
mLogicalSlotIdx
=
portList
.
isEmpty
()
?
SubscriptionManager
.
INVALID_PHONE_INDEX
:
portList
.
get
(
0
).
getLogicalSlotIndex
();
}
/**
...
...
@@ -164,8 +166,7 @@ public class UiccSlotInfo implements Parcelable {
throw
new
UnsupportedOperationException
(
"getIsActive() is not supported by "
+
"UiccSlotInfo. Please Use UiccPortInfo API instead"
);
}
//always return status from first port.
return
getPorts
().
stream
().
findFirst
().
get
().
isActive
();
return
mIsActive
;
}
public
boolean
getIsEuicc
()
{
...
...
@@ -202,9 +203,7 @@ public class UiccSlotInfo implements Parcelable {
throw
new
UnsupportedOperationException
(
"getLogicalSlotIdx() is not supported by "
+
"UiccSlotInfo. Please use UiccPortInfo API instead"
);
}
//always return logical slot index from first port.
//portList always have at least one element.
return
getPorts
().
stream
().
findFirst
().
get
().
getLogicalSlotIndex
();
return
mLogicalSlotIdx
;
}
/**
...
...
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