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
41413d8e
Commit
41413d8e
authored
10 months ago
by
Treehugger Robot
Committed by
Gerrit Code Review
10 months ago
Browse files
Options
Downloads
Plain Diff
Merge "nfc(api): Dont invoke enableReaderMode from setDiscoveryTech" into main
parents
c909a3e2
280c087c
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
nfc/java/android/nfc/NfcActivityManager.java
+11
-5
11 additions, 5 deletions
nfc/java/android/nfc/NfcActivityManager.java
nfc/java/android/nfc/NfcAdapter.java
+1
-4
1 addition, 4 deletions
nfc/java/android/nfc/NfcAdapter.java
with
12 additions
and
9 deletions
nfc/java/android/nfc/NfcActivityManager.java
+
11
−
5
View file @
41413d8e
...
...
@@ -195,16 +195,25 @@ public final class NfcActivityManager extends IAppCallback.Stub
Bundle
extras
)
{
boolean
isResumed
;
Binder
token
;
int
pollTech
,
listenTech
;
synchronized
(
NfcActivityManager
.
this
)
{
NfcActivityState
state
=
getActivityState
(
activity
);
state
.
readerCallback
=
callback
;
state
.
readerModeFlags
=
flags
;
state
.
readerModeExtras
=
extras
;
pollTech
=
state
.
mPollTech
;
listenTech
=
state
.
mListenTech
;
token
=
state
.
token
;
isResumed
=
state
.
resumed
;
}
if
(
isResumed
)
{
setReaderMode
(
token
,
flags
,
extras
);
if
(
listenTech
!=
NfcAdapter
.
FLAG_USE_ALL_TECH
||
pollTech
!=
NfcAdapter
.
FLAG_USE_ALL_TECH
)
{
throw
new
IllegalStateException
(
"Cannot be used when alternative DiscoveryTechnology is set"
);
}
else
{
setReaderMode
(
token
,
flags
,
extras
);
}
}
}
...
...
@@ -385,15 +394,12 @@ public final class NfcActivityManager extends IAppCallback.Stub
boolean
readerModeFlagsSet
;
synchronized
(
NfcActivityManager
.
this
)
{
NfcActivityState
state
=
getActivityState
(
activity
);
readerModeFlagsSet
=
state
.
readerModeFlags
!=
0
;
state
.
mListenTech
=
NfcAdapter
.
FLAG_USE_ALL_TECH
;
state
.
mPollTech
=
NfcAdapter
.
FLAG_USE_ALL_TECH
;
token
=
state
.
token
;
isResumed
=
state
.
resumed
;
}
if
(
readerModeFlagsSet
)
{
disableReaderMode
(
activity
);
}
else
if
(
isResumed
)
{
if
(
isResumed
)
{
changeDiscoveryTech
(
token
,
NfcAdapter
.
FLAG_USE_ALL_TECH
,
NfcAdapter
.
FLAG_USE_ALL_TECH
);
}
...
...
This diff is collapsed.
Click to expand it.
nfc/java/android/nfc/NfcAdapter.java
+
1
−
4
View file @
41413d8e
...
...
@@ -1846,10 +1846,7 @@ public final class NfcAdapter {
throw
new
UnsupportedOperationException
();
}
}
mNfcActivityManager
.
enableReaderMode
(
activity
,
null
,
pollTechnology
,
null
);
return
;
}
if
(
pollTechnology
==
FLAG_READER_DISABLE
)
{
}
else
if
(
pollTechnology
==
FLAG_READER_DISABLE
)
{
synchronized
(
sLock
)
{
if
(!
sHasCeFeature
)
{
throw
new
UnsupportedOperationException
();
...
...
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