Cherry-pick from GB to HC, updating 11.xml.
Final final final Gingerbread MR API changes.
This is it. I promise.
ACTION_TECHNOLOGY_DISCOVERED -> ACTION_TECH_DISCOVERED
This was missed in our technology->tech rename.
Hide TagTechnology.reconnect()
This is used to reset any per-connection state in a tag, by reconnecting
to it. The first problem is that it belongs on Tag, not TagTechnology. The
second problem is that it may become redundant once we add Tag.rediscover()
which will also reconnect to the tag, and will also return a new Tag with
newly created technologies enumerated. And the third and most significant
problem is that you can already achieve the same result by just calling
close() followed by connect().
Hide Tag.createMockTag()
This API cannot be used reliably. First it requires using int[] for the
technology list, but those int constants are now hidden. Second it requires
knowledge of the extras parcel used to fill technology specific data - also
not public.
Introduce TagTechnology.isConnected()
Every child class already impelmented this, and given that connect() and
close() are defined on the interface, then isConnected() should be there
too.
Modify Ndef.getType to return a string (not int)
Allows more flexibility in adding new NDEF types. Current public strings are
org.nfcforum.ndef.type1
org.nfcforum.ndef.type2
org.nfcforum.ndef.type3
org.nfcforum.ndef.type4
com.nxp.ndef.mifareclassic
Add NdefFormatable.formatReadOnly()
This allows you to make the tag read-only at the same time as performing
format and write. It is important because we currently don't have any
public API to re-enumerate a tag technology list after making a tag
NDEF compatible, so you can't perform the format as a seperate step
without physically removing the tag from field and returning it.
Modify Readonly -> ReadOnly
Make Tag class final
Change-Id: Ifa8a17741fcc95776ffdba42f611eadb036aaf2d
...an already-closed object: android.database.sqlite.SQLiteQuery
It turns out there is a state we are missing -- the loader is
still needed, but in the inactive list. In this case the loader
needs to continue holding on to its current data, and not deliver
any new data (which would result in it releasing its old data).
This introduces the new state to Loader, and uses it in
AsyncTaskLoader so all subclasses of that should get the new
correct behavior.
A further improvement would be to unregister CursorLoader's
content listener when going in to this state, but that can
wait for later.
Change-Id: I6d30173b94f8e30b5be31d018accd328cc3388ec
IOException on close() can be useful to indicate that in-progress transactions
were canceled.
I also audited all of our tech classes to make sure every function that needs
to throw IOException does so.
Change-Id: Iaa9c43d79d59ff85772d5c3e4b4d57a6fa8df4cf
o Some javadoc updates
o writeBlock -> writePages (Block means something else in NFC Forum).
o validate page offset
Change-Id: Icae54db3397d57aaa451caaa86d56e8ba82507f2
Various property setters in View need to invalidate the parent's
cache to get redrawn properly when accelerated with display lists.
Also, fix logic around display lists and old-style Animations in
ViewGroup.
Change-Id: I70e1c2fa49e62228ee4a1301a006ce50bda4c305
Applications that create an icon for launcher to use couldn't determine
which size or density the icon should be created.
Bug: 3224340
Change-Id: Iee96113a4092696a9bd18eecbd2593b38f952a16
- Fix for crash when detaching from window
- Potential fix for occasional IllegalStateException when updating List based widgets
Change-Id: I3d3f2bb691552a1136111043db686c4926b510c6
I hadn't wanted to do this, but it makes porting the FLAG_FULLSCREEN
stuff over to this simpler because you don't have to go find a view
to proxy through.
This change also clears the flag everywhere when the window manager
notifies the views that the change has come back.
Change-Id: I48392c7550925bcca50c5bb9e1f263e99de6c7bc
This makes the system more flexible and allows
adding new technology types without having to
update the API.
Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
...Invalid index 0, size is 0 at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)
It looks like if an arrow key is dispatched between the time the
list view is told its data set has changed and it does the resulting
layout pass, we could try to move the position to a now invalid
index. This may prevent that from happening.
Also put in a better error message if saving state of a fragment
whose target is no longer in the fragment manager.
And fix a bug in PackageManager where we could return a null from
queryIntentActivities().
And add a new API to find out whether a fragment is being removed,
to help fix issue #3306021: NPE at
android.app.AlertDialog.getDefaultDialogTheme(AlertDialog.java)
Next, for new HC apps we can delay committing data to
storage until the activity is stopped.
Finally, use the new multi-threaded AyncTask executor in a few
places, so we don't have worked blocked by long-running tasks from
the application.
Change-Id: I27b2aafedf2e1bf3a2316309889613fa539760f3
* Define Base64DataException
* Throw it from Base64InputStream & Base64OutputStream
* This enables callers to disambiguate "bad data" from "broken stream",
which makes it more possible to do proper retry logic.
Bug: 3365205
Change-Id: I332e7c008f92b333400d1b4dcaef5aedc7c10ef4
Remove method overloading for combinations of sector+block addressing.
Instead provide methods that more closly match the raw commands, and more
efficient helpers to convert between blocks and sectors.
o fix off-by-one bug in getBlockCountInSector()
o add BLOCK_SIZE
o remove DESFIRE not operating in classic emulation (SAK 0x20)
o hide isEmulated(), there is no use case, and the info is available elsewhere
o getTotalBlockCount() -> getBlockCount()
o getBlockCount(int) -> getBlockCountInSector(int)
o introduce blockToSector() and sectorToBlock()
o remove authenticateBlock()
make it really clear that authentication is per sector, and reduce function
explosion. blockToSector() allows you to use authenticateSector...
o explicit authenticateSectorWithKeyA() / authenticateSectorWithKeyB()
get rid of magic boolean
o remove all (int sector, int block) parameters
always address by absolute block. this makes the API crystal clear, and
helps reduce function explosion
o validation of all sector and block indices
o dont & 0xff when converting to byte - its redundant
o Remove TYPE_OTHER. Mifare Classic types are well-known and stable.
Change-Id: I3c9f8254ff307f31b388b3d7592c862d5de6afa5