The Javadoc for isItemChecked, getCheckedItemPosition, and
getCheckedItemPositions stated the return was valid if conditions
were the inverse of what the method checked for.
This was pointed out in Android issue 2366
Nowhere in the documentation does it say that the only valid package names
are ones that match (excuse my abuse of regex to explain this):
^[A-Za-z][A-Za-z0-9_]
This change makes clear the rules followed by the PackageParser
Modeled on blocking java.net.Socket and java.net.ServerSocket library.
Public interface is:
public final class BluetoothSocket implements Closeable {
public static BluetoothSocket createRfcommSocket(String address, int port) throws IOException;
public static BluetoothSocket createInsecureRfcommSocket(String address, int port) throws IOException;
public void connect() throws IOException;
public void close() throws IOException;
public String getAddress();
public InputStream getInputStream() throws IOException;
public OutputStream getOutputStream() throws IOException;
}
public final class BluetoothServerSocket implements Closeable {
public static BluetoothServerSocket listenUsingRfcommOn(int port) throws IOException;
public static BluetoothServerSocket listenUsingUnsecureRfcommOn(int port) throws IOException;
public BluetoothSocket accept() throws IOException;
public BluetoothSocket accept(int timeout) throws IOException;
public void close() throws IOException;
}
This provided SDP functionality to Java, but is not currently used by any Apps.
I will shortly be providing SDP functionality in a new API, but it will be
quite different to this one, and in the mean-time keeping this stale code
updated with other API changes is a pain.
To address issues where we could leave half-installed applications around if there was a failure during the install, we split getPackageLP() into two phases: the first would create the record, and only after doing all verification checks would we call insertPackageSettingLP() to do the remaining part of the original implementation and actually insert the record into the data structures.
Unfortunately it was only in insertPackageSettingLP() that we would set the sharedUser field of the PackageSetting structure, so when before that we went to verify certificates, we didn't think it had requested a shared user ID, and let it through without checking.
This fix simply sets the sharedUser field when the PackageSetting structure is first created, so we will actually check against its certs. We still also set this again in insertPackageSettingLP(), but there is no harm in this because the only time we call this function is in that big install func, which just passes in the same shared user that it had when first getting the package.
BUG=1851541
Automated import of CL 148824
To address issues where we could leave half-installed applications around if there was a failure during the install, we split getPackageLP() into two phases: the first would create the record, and only after doing all verification checks would we call insertPackageSettingLP() to do the remaining part of the original implementation and actually insert the record into the data structures.
Unfortunately it was only in insertPackageSettingLP() that we would set the sharedUser field of the PackageSetting structure, so when before that we went to verify certificates, we didn't think it had requested a shared user ID, and let it through without checking.
This fix simply sets the sharedUser field when the PackageSetting structure is first created, so we will actually check against its certs. We still also set this again in insertPackageSettingLP(), but there is no harm in this because the only time we call this function is in that big install func, which just passes in the same shared user that it had when first getting the package.
BUG=1851541
Automated import of CL 148824