summaryrefslogtreecommitdiffstats
path: root/location/lib/README.txt
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2012-08-14 19:13:47 -0700
committerNick Pelly <npelly@google.com>2012-08-16 17:59:35 -0700
commitb03c8c508dcbbef364e624ad5bc0ab6fa6733dc7 (patch)
tree78268b9a4f2cdfcecbdca83a024f6fb9fce013ff /location/lib/README.txt
parent4e31c4fffbc42b4c2b5dca6431cfeef9e078f5b4 (diff)
downloadframeworks_base-b03c8c508dcbbef364e624ad5bc0ab6fa6733dc7.zip
frameworks_base-b03c8c508dcbbef364e624ad5bc0ab6fa6733dc7.tar.gz
frameworks_base-b03c8c508dcbbef364e624ad5bc0ab6fa6733dc7.tar.bz2
Add documentation for com.android.location.provider shared library.
Change-Id: I222d61811c88272e84a85512623210c0238337e5
Diffstat (limited to 'location/lib/README.txt')
-rw-r--r--location/lib/README.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/location/lib/README.txt b/location/lib/README.txt
new file mode 100644
index 0000000..400a7dd
--- /dev/null
+++ b/location/lib/README.txt
@@ -0,0 +1,30 @@
+This library (com.android.location.provider.jar) is a shared java library
+containing classes required by unbundled location providers.
+
+--- Rules of this library ---
+o This library is effectively a PUBLIC API for unbundled location providers
+ that may be distributed outside the system image. So it MUST BE API STABLE.
+ You can add but not remove. The rules are the same as for the
+ public platform SDK API.
+o This library can see and instantiate internal platform classes (such as
+ ProviderRequest.java), but it must not expose them in any public method
+ (or by extending them via inheritance). This would break clients of the
+ library because they cannot see the internal platform classes.
+
+This library is distributed in the system image, and loaded as
+a shared library. So you can change the implementation, but not
+the interface. In this way it is like framework.jar.
+
+--- Why does this library exists? ---
+
+Unbundled location providers (such as the NetworkLocationProvider)
+can not use internal platform classes.
+
+So ideally all of these classes would be part of the public platform SDK API,
+but that doesn't seem like a great idea when only applications with a special
+signature can implement this API.
+
+The compromise is this library.
+
+It wraps internal platform classes (like ProviderRequest) with a stable
+API that does not leak the internal classes.