Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
packages_apps_Tag
Commits
e095ece7
Commit
e095ece7
authored
14 years ago
by
Nick Pelly
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Download
Plain Diff
Merge "Update Tag for new NfcAdapter.getDefaultAdapter(Context)" into gingerbread
parents
3fda14b0
3341736c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/com/android/apps/tag/MyTagActivity.java
src/com/android/apps/tag/MyTagActivity.java
+3
-3
src/com/android/apps/tag/TagBrowserActivity.java
src/com/android/apps/tag/TagBrowserActivity.java
+1
-1
No files found.
src/com/android/apps/tag/MyTagActivity.java
View file @
e095ece7
...
...
@@ -78,7 +78,7 @@ public class MyTagActivity extends EditTagActivity implements OnClickListener {
}
private
void
populateEditor
()
{
NdefMessage
localMessage
=
NfcAdapter
.
getDefaultAdapter
().
getLocalNdefMessage
();
NdefMessage
localMessage
=
NfcAdapter
.
getDefaultAdapter
(
this
).
getLocalNdefMessage
();
if
(
Intent
.
ACTION_SEND
.
equals
(
getIntent
().
getAction
())
&&
!
mParsedIntent
)
{
if
(
localMessage
!=
null
)
{
...
...
@@ -168,7 +168,7 @@ public class MyTagActivity extends EditTagActivity implements OnClickListener {
*/
private
void
onSave
()
{
String
text
=
mTextView
.
getText
().
toString
();
NfcAdapter
nfc
=
NfcAdapter
.
getDefaultAdapter
();
NfcAdapter
nfc
=
NfcAdapter
.
getDefaultAdapter
(
this
);
if
(!
mEnabled
.
isChecked
())
{
nfc
.
setLocalNdefMessage
(
null
);
...
...
@@ -203,7 +203,7 @@ public class MyTagActivity extends EditTagActivity implements OnClickListener {
if
(
enabled
)
{
onSave
();
}
else
{
NfcAdapter
.
getDefaultAdapter
().
setLocalNdefMessage
(
null
);
NfcAdapter
.
getDefaultAdapter
(
this
).
setLocalNdefMessage
(
null
);
}
break
;
...
...
This diff is collapsed.
Click to expand it.
src/com/android/apps/tag/TagBrowserActivity.java
View file @
e095ece7
...
...
@@ -86,7 +86,7 @@ public class TagBrowserActivity extends TabActivity implements DialogInterface.O
public
void
onResume
()
{
super
.
onResume
();
// Check to see if NFC is on
NfcAdapter
nfc
=
NfcAdapter
.
getDefaultAdapter
();
NfcAdapter
nfc
=
NfcAdapter
.
getDefaultAdapter
(
this
);
if
(
nfc
==
null
||
!
nfc
.
isEnabled
())
{
showDialog
(
DIALOG_NFC_OFF
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment