summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/bluetooth/BluetoothDevice.java2
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java4
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java4
-rw-r--r--core/java/android/bluetooth/BluetoothManager.java2
-rw-r--r--docs/html/guide/topics/ui/drag-drop.jd2
-rw-r--r--docs/html/guide/topics/ui/multi-window.jd2
-rw-r--r--docs/html/training/monitoring-device-state/battery-monitoring.jd9
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerShellCommand.java15
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java21
-rw-r--r--services/net/java/android/net/ip/IpManager.java7
10 files changed, 41 insertions, 27 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 6d6dfebced2c..cd5eff29237c 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -1596,7 +1596,7 @@ public final class BluetoothDevice implements Parcelable {
// BLE is not supported
return null;
}
- BluetoothGatt gatt = new BluetoothGatt(context, iGatt, this, transport);
+ BluetoothGatt gatt = new BluetoothGatt(iGatt, this, transport);
gatt.connect(autoConnect, callback);
return gatt;
} catch (RemoteException e) {Log.e(TAG, "", e);}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 800dd434a969..552c8d3b0143 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -41,7 +41,6 @@ public final class BluetoothGatt implements BluetoothProfile {
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private IBluetoothGatt mService;
private BluetoothGattCallback mCallback;
private int mClientIf;
@@ -496,9 +495,8 @@ public final class BluetoothGatt implements BluetoothProfile {
}
};
- /*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device,
+ /*package*/ BluetoothGatt(IBluetoothGatt iGatt, BluetoothDevice device,
int transport) {
- mContext = context;
mService = iGatt;
mDevice = device;
mTransport = transport;
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index f4513405b196..9f8d1a77a809 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -44,7 +44,6 @@ public final class BluetoothGattServer implements BluetoothProfile {
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private BluetoothAdapter mAdapter;
private IBluetoothGatt mService;
private BluetoothGattServerCallback mCallback;
@@ -307,8 +306,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
/**
* Create a BluetoothGattServer proxy object.
*/
- /*package*/ BluetoothGattServer(Context context, IBluetoothGatt iGatt, int transport) {
- mContext = context;
+ /*package*/ BluetoothGattServer(IBluetoothGatt iGatt, int transport) {
mService = iGatt;
mAdapter = BluetoothAdapter.getDefaultAdapter();
mCallback = null;
diff --git a/core/java/android/bluetooth/BluetoothManager.java b/core/java/android/bluetooth/BluetoothManager.java
index 00058a979094..29283e793ce9 100644
--- a/core/java/android/bluetooth/BluetoothManager.java
+++ b/core/java/android/bluetooth/BluetoothManager.java
@@ -236,7 +236,7 @@ public final class BluetoothManager {
Log.e(TAG, "Fail to get GATT Server connection");
return null;
}
- BluetoothGattServer mGattServer = new BluetoothGattServer(context, iGatt,transport);
+ BluetoothGattServer mGattServer = new BluetoothGattServer(iGatt,transport);
Boolean regStatus = mGattServer.registerCallback(callback);
return regStatus? mGattServer : null;
} catch (RemoteException e) {
diff --git a/docs/html/guide/topics/ui/drag-drop.jd b/docs/html/guide/topics/ui/drag-drop.jd
index 4a87cd4938cb..8e4297f8ce1b 100644
--- a/docs/html/guide/topics/ui/drag-drop.jd
+++ b/docs/html/guide/topics/ui/drag-drop.jd
@@ -321,7 +321,7 @@ DraggableDot.java</a> in <a href="{@docRoot}resources/samples/ApiDemos/index.htm
<p>
If the listener wants to continue receiving drag events for this operation, it must
return boolean <code>true</code> to the system.
- <\p>
+ </p>
</td>
</tr>
<tr>
diff --git a/docs/html/guide/topics/ui/multi-window.jd b/docs/html/guide/topics/ui/multi-window.jd
index dede557ecc9a..bab582dd0b8c 100644
--- a/docs/html/guide/topics/ui/multi-window.jd
+++ b/docs/html/guide/topics/ui/multi-window.jd
@@ -215,7 +215,7 @@ android:resizeableActivity=["true" | "false"]
Set this attribute in your manifest's <a href=
"{@docRoot}guide/topics/manifest/activity-element"><code>&lt;activity&gt;</code></a>
node to indicate whether the activity supports <a href=
- "{@docRoot}training/tv/playback/picture-in-picture.jd">Picture-in-Picture</a>
+ "{@docRoot}training/tv/playback/picture-in-picture.html">Picture-in-Picture</a>
display. This attribute is ignored if <code>android:resizeableActivity</code>
is false.
</p>
diff --git a/docs/html/training/monitoring-device-state/battery-monitoring.jd b/docs/html/training/monitoring-device-state/battery-monitoring.jd
index db75aaf1f899..bab9c9cf6baf 100644
--- a/docs/html/training/monitoring-device-state/battery-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/battery-monitoring.jd
@@ -141,10 +141,11 @@ receiver. The receiver is triggered whenever the device battery becomes low or e
condition by listening for {@link android.content.Intent#ACTION_BATTERY_LOW} and {@link
android.content.Intent#ACTION_BATTERY_OKAY}.</p>
-<pre>&lt;receiver android:name=".BatteryLevelReceiver">
-&lt;intent-filter>
- &lt;action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
- &lt;action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>
+<pre>
+&lt;receiver android:name=".BatteryLevelReceiver">
+ &lt;intent-filter>
+ &lt;action android:name="android.intent.action.BATTERY_LOW"/>
+ &lt;action android:name="android.intent.action.BATTERY_OKAY"/>
&lt;/intent-filter>
&lt;/receiver></pre>
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index e5ddfd09d82b..b6cecc94aecb 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -1147,14 +1147,15 @@ class PackageManagerShellCommand extends ShellCommand {
private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName,
boolean logSuccess) throws RemoteException {
final PrintWriter pw = getOutPrintWriter();
- if ("-".equals(inPath)) {
- inPath = null;
- } else if (inPath != null) {
- final File file = new File(inPath);
- if (file.isFile()) {
- sizeBytes = file.length();
- }
+ if (sizeBytes <= 0) {
+ pw.println("Error: must specify a APK size");
+ return 1;
+ }
+ if (inPath != null && !"-".equals(inPath)) {
+ pw.println("Error: APK content must be streamed");
+ return 1;
}
+ inPath = null;
final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId);
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 2eceb0b0a52e..45014ec07178 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -496,6 +496,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
});
}
+ // STOPSHIP: Remove this code once all dogfood devices are fixed. See b/31754835
+ if (Intent.ACTION_BOOT_COMPLETED.equals(action) && !mOwners.hasDeviceOwner()
+ && !isBackupServiceEnabledInternal()) {
+ setBackupServiceEnabledInternal(true);
+ Slog.w(LOG_TAG, "Fix backup for device that is not in Device Owner mode.");
+ }
if (Intent.ACTION_USER_UNLOCKED.equals(action)
|| Intent.ACTION_USER_STARTED.equals(action)
|| KeyChain.ACTION_STORAGE_CHANGED.equals(action)) {
@@ -9319,12 +9325,15 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
synchronized (this) {
getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
- try {
- IBackupManager ibm = mInjector.getIBackupManager();
- return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM);
- } catch (RemoteException e) {
- throw new IllegalStateException("Failed requesting backup service state.", e);
- }
+ return isBackupServiceEnabledInternal();
+ }
+ }
+ private boolean isBackupServiceEnabledInternal() {
+ try {
+ IBackupManager ibm = mInjector.getIBackupManager();
+ return ibm != null && ibm.isBackupServiceActive(UserHandle.USER_SYSTEM);
+ } catch (RemoteException e) {
+ throw new IllegalStateException("Failed requesting backup service state.", e);
}
}
}
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index 215059d563f6..ee67d953ec29 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -358,6 +358,7 @@ public class IpManager extends StateMachine {
}
public static final String DUMP_ARG = "ipmanager";
+ public static final String DUMP_ARG_CONFIRM = "confirm";
private static final int CMD_STOP = 1;
private static final int CMD_START = 2;
@@ -562,6 +563,12 @@ public class IpManager extends StateMachine {
}
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+ if (args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) {
+ // Execute confirmConfiguration() and take no further action.
+ confirmConfiguration();
+ return;
+ }
+
IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
pw.println("APF dump:");
pw.increaseIndent();