summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/ConnectivityService.java7
-rw-r--r--services/java/com/android/server/LocationManagerService.java3
-rw-r--r--services/java/com/android/server/NativeDaemonEvent.java4
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/NotificationManagerService.java0
-rw-r--r--services/java/com/android/server/NsdService.java252
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/VibratorService.java0
-rw-r--r--services/java/com/android/server/WifiService.java4
-rw-r--r--services/java/com/android/server/accessibility/AccessibilityManagerService.java2
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/am/ActivityStack.java0
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/am/package.html0
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/location/ComprehensiveCountryDetector.java0
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/location/GpsLocationProvider.java0
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/location/LocationBasedCountryDetector.java0
-rw-r--r--services/java/com/android/server/net/NetworkPolicyManagerService.java8
-rw-r--r--services/java/com/android/server/net/NetworkStatsService.java10
-rw-r--r--services/java/com/android/server/updates/CertPinInstallReceiver.java24
-rw-r--r--services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java (renamed from services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java)0
-rw-r--r--[-rwxr-xr-x]services/java/com/android/server/wm/WindowManagerService.java34
18 files changed, 186 insertions, 162 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index a7c4d73..cccaf1c 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1183,8 +1183,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
log("startUsingNetworkFeature reconnecting to " + networkType + ": " +
feature);
}
- network.reconnect();
- return PhoneConstants.APN_REQUEST_STARTED;
+ if (network.reconnect()) {
+ return PhoneConstants.APN_REQUEST_STARTED;
+ } else {
+ return PhoneConstants.APN_REQUEST_FAILED;
+ }
} else {
// need to remember this unsupported request so we respond appropriately on stop
synchronized(this) {
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index f21f826..0f08c56 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1885,13 +1885,12 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
public void removeTestProvider(String provider) {
checkMockPermissionsSafe();
synchronized (mLock) {
- MockProvider mockProvider = mMockProviders.get(provider);
+ MockProvider mockProvider = mMockProviders.remove(provider);
if (mockProvider == null) {
throw new IllegalArgumentException("Provider \"" + provider + "\" unknown");
}
long identity = Binder.clearCallingIdentity();
removeProviderLocked(mProvidersByName.get(provider));
- mMockProviders.remove(mockProvider);
// reinstate real provider if available
LocationProviderInterface realProvider = mRealProviders.get(provider);
diff --git a/services/java/com/android/server/NativeDaemonEvent.java b/services/java/com/android/server/NativeDaemonEvent.java
index f11ae1d..2095152 100644
--- a/services/java/com/android/server/NativeDaemonEvent.java
+++ b/services/java/com/android/server/NativeDaemonEvent.java
@@ -223,8 +223,8 @@ public class NativeDaemonEvent {
current++; // skip the trailing quote
}
// unescape stuff within the word
- word.replace("\\\\", "\\");
- word.replace("\\\"", "\"");
+ word = word.replace("\\\\", "\\");
+ word = word.replace("\\\"", "\"");
if (DEBUG_ROUTINE) Slog.e(LOGTAG, "found '" + word + "'");
parsed.add(word);
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 37d7ce7..37d7ce7 100755..100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
diff --git a/services/java/com/android/server/NsdService.java b/services/java/com/android/server/NsdService.java
index 1b9742c..faa72a2 100644
--- a/services/java/com/android/server/NsdService.java
+++ b/services/java/com/android/server/NsdService.java
@@ -389,8 +389,10 @@ public class NsdService extends INsdManager.Stub {
break;
case NsdManager.NATIVE_DAEMON_EVENT:
NativeEvent event = (NativeEvent) msg.obj;
- handleNativeEvent(event.code, event.raw,
- NativeDaemonEvent.unescapeArgs(event.raw));
+ if (!handleNativeEvent(event.code, event.raw,
+ NativeDaemonEvent.unescapeArgs(event.raw))) {
+ result = NOT_HANDLED;
+ }
break;
default:
result = NOT_HANDLED;
@@ -398,6 +400,127 @@ public class NsdService extends INsdManager.Stub {
}
return result;
}
+
+ private boolean handleNativeEvent(int code, String raw, String[] cooked) {
+ boolean handled = true;
+ NsdServiceInfo servInfo;
+ int id = Integer.parseInt(cooked[1]);
+ ClientInfo clientInfo = mIdToClientInfoMap.get(id);
+ if (clientInfo == null) {
+ Slog.e(TAG, "Unique id with no client mapping: " + id);
+ handled = false;
+ return handled;
+ }
+
+ /* This goes in response as msg.arg2 */
+ int clientId = -1;
+ int keyId = clientInfo.mClientIds.indexOfValue(id);
+ if (keyId != -1) {
+ clientId = clientInfo.mClientIds.keyAt(keyId);
+ }
+ switch (code) {
+ case NativeResponseCode.SERVICE_FOUND:
+ /* NNN uniqueId serviceName regType domain */
+ if (DBG) Slog.d(TAG, "SERVICE_FOUND Raw: " + raw);
+ servInfo = new NsdServiceInfo(cooked[2], cooked[3], null);
+ clientInfo.mChannel.sendMessage(NsdManager.SERVICE_FOUND, 0,
+ clientId, servInfo);
+ break;
+ case NativeResponseCode.SERVICE_LOST:
+ /* NNN uniqueId serviceName regType domain */
+ if (DBG) Slog.d(TAG, "SERVICE_LOST Raw: " + raw);
+ servInfo = new NsdServiceInfo(cooked[2], cooked[3], null);
+ clientInfo.mChannel.sendMessage(NsdManager.SERVICE_LOST, 0,
+ clientId, servInfo);
+ break;
+ case NativeResponseCode.SERVICE_DISCOVERY_FAILED:
+ /* NNN uniqueId errorCode */
+ if (DBG) Slog.d(TAG, "SERVICE_DISC_FAILED Raw: " + raw);
+ clientInfo.mChannel.sendMessage(NsdManager.DISCOVER_SERVICES_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ break;
+ case NativeResponseCode.SERVICE_REGISTERED:
+ /* NNN regId serviceName regType */
+ if (DBG) Slog.d(TAG, "SERVICE_REGISTERED Raw: " + raw);
+ servInfo = new NsdServiceInfo(cooked[2], null, null);
+ clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_SUCCEEDED,
+ id, clientId, servInfo);
+ break;
+ case NativeResponseCode.SERVICE_REGISTRATION_FAILED:
+ /* NNN regId errorCode */
+ if (DBG) Slog.d(TAG, "SERVICE_REGISTER_FAILED Raw: " + raw);
+ clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ break;
+ case NativeResponseCode.SERVICE_UPDATED:
+ /* NNN regId */
+ break;
+ case NativeResponseCode.SERVICE_UPDATE_FAILED:
+ /* NNN regId errorCode */
+ break;
+ case NativeResponseCode.SERVICE_RESOLVED:
+ /* NNN resolveId fullName hostName port txtlen txtdata */
+ if (DBG) Slog.d(TAG, "SERVICE_RESOLVED Raw: " + raw);
+ int index = cooked[2].indexOf(".");
+ if (index == -1) {
+ Slog.e(TAG, "Invalid service found " + raw);
+ break;
+ }
+ String name = cooked[2].substring(0, index);
+ String rest = cooked[2].substring(index);
+ String type = rest.replace(".local.", "");
+
+ clientInfo.mResolvedService.setServiceName(name);
+ clientInfo.mResolvedService.setServiceType(type);
+ clientInfo.mResolvedService.setPort(Integer.parseInt(cooked[4]));
+
+ stopResolveService(id);
+ if (!getAddrInfo(id, cooked[3])) {
+ clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ removeRequestMap(clientId, id, clientInfo);
+ clientInfo.mResolvedService = null;
+ }
+ break;
+ case NativeResponseCode.SERVICE_RESOLUTION_FAILED:
+ /* NNN resolveId errorCode */
+ if (DBG) Slog.d(TAG, "SERVICE_RESOLVE_FAILED Raw: " + raw);
+ stopResolveService(id);
+ removeRequestMap(clientId, id, clientInfo);
+ clientInfo.mResolvedService = null;
+ clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ break;
+ case NativeResponseCode.SERVICE_GET_ADDR_FAILED:
+ /* NNN resolveId errorCode */
+ stopGetAddrInfo(id);
+ removeRequestMap(clientId, id, clientInfo);
+ clientInfo.mResolvedService = null;
+ if (DBG) Slog.d(TAG, "SERVICE_RESOLVE_FAILED Raw: " + raw);
+ clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ break;
+ case NativeResponseCode.SERVICE_GET_ADDR_SUCCESS:
+ /* NNN resolveId hostname ttl addr */
+ if (DBG) Slog.d(TAG, "SERVICE_GET_ADDR_SUCCESS Raw: " + raw);
+ try {
+ clientInfo.mResolvedService.setHost(InetAddress.getByName(cooked[4]));
+ clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_SUCCEEDED,
+ 0, clientId, clientInfo.mResolvedService);
+ } catch (java.net.UnknownHostException e) {
+ clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
+ NsdManager.FAILURE_INTERNAL_ERROR, clientId);
+ }
+ stopGetAddrInfo(id);
+ removeRequestMap(clientId, id, clientInfo);
+ clientInfo.mResolvedService = null;
+ break;
+ default:
+ handled = false;
+ break;
+ }
+ return handled;
+ }
}
}
@@ -483,8 +606,8 @@ public class NsdService extends INsdManager.Stub {
}
private class NativeEvent {
- int code;
- String raw;
+ final int code;
+ final String raw;
NativeEvent(int code, String raw) {
this.code = code;
@@ -506,123 +629,6 @@ public class NsdService extends INsdManager.Stub {
}
}
- private void handleNativeEvent(int code, String raw, String[] cooked) {
- NsdServiceInfo servInfo;
- int id = Integer.parseInt(cooked[1]);
- ClientInfo clientInfo = mIdToClientInfoMap.get(id);
- if (clientInfo == null) {
- Slog.e(TAG, "Unique id with no client mapping: " + id);
- return;
- }
-
- /* This goes in response as msg.arg2 */
- int clientId = -1;
- int keyId = clientInfo.mClientIds.indexOfValue(id);
- if (keyId != -1) {
- clientId = clientInfo.mClientIds.keyAt(keyId);
- }
- switch (code) {
- case NativeResponseCode.SERVICE_FOUND:
- /* NNN uniqueId serviceName regType domain */
- if (DBG) Slog.d(TAG, "SERVICE_FOUND Raw: " + raw);
- servInfo = new NsdServiceInfo(cooked[2], cooked[3], null);
- clientInfo.mChannel.sendMessage(NsdManager.SERVICE_FOUND, 0,
- clientId, servInfo);
- break;
- case NativeResponseCode.SERVICE_LOST:
- /* NNN uniqueId serviceName regType domain */
- if (DBG) Slog.d(TAG, "SERVICE_LOST Raw: " + raw);
- servInfo = new NsdServiceInfo(cooked[2], cooked[3], null);
- clientInfo.mChannel.sendMessage(NsdManager.SERVICE_LOST, 0,
- clientId, servInfo);
- break;
- case NativeResponseCode.SERVICE_DISCOVERY_FAILED:
- /* NNN uniqueId errorCode */
- if (DBG) Slog.d(TAG, "SERVICE_DISC_FAILED Raw: " + raw);
- clientInfo.mChannel.sendMessage(NsdManager.DISCOVER_SERVICES_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- break;
- case NativeResponseCode.SERVICE_REGISTERED:
- /* NNN regId serviceName regType */
- if (DBG) Slog.d(TAG, "SERVICE_REGISTERED Raw: " + raw);
- servInfo = new NsdServiceInfo(cooked[2], null, null);
- clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_SUCCEEDED,
- id, clientId, servInfo);
- break;
- case NativeResponseCode.SERVICE_REGISTRATION_FAILED:
- /* NNN regId errorCode */
- if (DBG) Slog.d(TAG, "SERVICE_REGISTER_FAILED Raw: " + raw);
- clientInfo.mChannel.sendMessage(NsdManager.REGISTER_SERVICE_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- break;
- case NativeResponseCode.SERVICE_UPDATED:
- /* NNN regId */
- break;
- case NativeResponseCode.SERVICE_UPDATE_FAILED:
- /* NNN regId errorCode */
- break;
- case NativeResponseCode.SERVICE_RESOLVED:
- /* NNN resolveId fullName hostName port txtlen txtdata */
- if (DBG) Slog.d(TAG, "SERVICE_RESOLVED Raw: " + raw);
- int index = cooked[2].indexOf(".");
- if (index == -1) {
- Slog.e(TAG, "Invalid service found " + raw);
- break;
- }
- String name = cooked[2].substring(0, index);
- String rest = cooked[2].substring(index);
- String type = rest.replace(".local.", "");
-
- clientInfo.mResolvedService.setServiceName(name);
- clientInfo.mResolvedService.setServiceType(type);
- clientInfo.mResolvedService.setPort(Integer.parseInt(cooked[4]));
-
- stopResolveService(id);
- if (!getAddrInfo(id, cooked[3])) {
- clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- mIdToClientInfoMap.remove(id);
- clientInfo.mResolvedService = null;
- }
- break;
- case NativeResponseCode.SERVICE_RESOLUTION_FAILED:
- /* NNN resolveId errorCode */
- if (DBG) Slog.d(TAG, "SERVICE_RESOLVE_FAILED Raw: " + raw);
- stopResolveService(id);
- mIdToClientInfoMap.remove(id);
- clientInfo.mResolvedService = null;
- clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- break;
- case NativeResponseCode.SERVICE_GET_ADDR_FAILED:
- /* NNN resolveId errorCode */
- stopGetAddrInfo(id);
- mIdToClientInfoMap.remove(id);
- clientInfo.mResolvedService = null;
- if (DBG) Slog.d(TAG, "SERVICE_RESOLVE_FAILED Raw: " + raw);
- clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- break;
- case NativeResponseCode.SERVICE_GET_ADDR_SUCCESS:
- /* NNN resolveId hostname ttl addr */
- if (DBG) Slog.d(TAG, "SERVICE_GET_ADDR_SUCCESS Raw: " + raw);
- try {
- clientInfo.mResolvedService.setHost(InetAddress.getByName(cooked[4]));
- clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_SUCCEEDED,
- 0, clientId, clientInfo.mResolvedService);
- } catch (java.net.UnknownHostException e) {
- clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
- NsdManager.FAILURE_INTERNAL_ERROR, clientId);
- }
- stopGetAddrInfo(id);
- mIdToClientInfoMap.remove(id);
- clientInfo.mResolvedService = null;
- break;
- default:
- break;
- }
- }
-
private boolean startMDnsDaemon() {
if (DBG) Slog.d(TAG, "startMDnsDaemon");
try {
@@ -801,8 +807,8 @@ public class NsdService extends INsdManager.Stub {
private class ClientInfo {
private static final int MAX_LIMIT = 10;
- private AsyncChannel mChannel;
- private Messenger mMessenger;
+ private final AsyncChannel mChannel;
+ private final Messenger mMessenger;
/* Remembers a resolved service until getaddrinfo completes */
private NsdServiceInfo mResolvedService;
diff --git a/services/java/com/android/server/VibratorService.java b/services/java/com/android/server/VibratorService.java
index df91dec..df91dec 100755..100644
--- a/services/java/com/android/server/VibratorService.java
+++ b/services/java/com/android/server/VibratorService.java
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 98794c9..dfcc72b 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -1577,7 +1577,7 @@ public class WifiService extends IWifiManager.Stub {
}
int uid = Binder.getCallingUid();
- Long ident = Binder.clearCallingIdentity();
+ final long ident = Binder.clearCallingIdentity();
try {
mBatteryStats.noteWifiMulticastEnabled(uid);
} catch (RemoteException e) {
@@ -1613,7 +1613,7 @@ public class WifiService extends IWifiManager.Stub {
mWifiStateMachine.startFilteringMulticastV4Packets();
}
- Long ident = Binder.clearCallingIdentity();
+ final long ident = Binder.clearCallingIdentity();
try {
mBatteryStats.noteWifiMulticastDisabled(uid);
} catch (RemoteException e) {
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index 671cbfe..a34d44c 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -1123,7 +1123,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
return;
}
mEnableTouchExplorationDialog = new AlertDialog.Builder(mContext)
- .setIcon(android.R.drawable.ic_dialog_alert)
+ .setIconAttribute(android.R.attr.alertDialogIcon)
.setPositiveButton(android.R.string.ok, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 27dd732..27dd732 100755..100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
diff --git a/services/java/com/android/server/am/package.html b/services/java/com/android/server/am/package.html
index c9f96a6..c9f96a6 100755..100644
--- a/services/java/com/android/server/am/package.html
+++ b/services/java/com/android/server/am/package.html
diff --git a/services/java/com/android/server/location/ComprehensiveCountryDetector.java b/services/java/com/android/server/location/ComprehensiveCountryDetector.java
index 354858b..354858b 100755..100644
--- a/services/java/com/android/server/location/ComprehensiveCountryDetector.java
+++ b/services/java/com/android/server/location/ComprehensiveCountryDetector.java
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index c272da4..c272da4 100755..100644
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
diff --git a/services/java/com/android/server/location/LocationBasedCountryDetector.java b/services/java/com/android/server/location/LocationBasedCountryDetector.java
index 03db621..03db621 100755..100644
--- a/services/java/com/android/server/location/LocationBasedCountryDetector.java
+++ b/services/java/com/android/server/location/LocationBasedCountryDetector.java
diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java
index b839331..b09390c 100644
--- a/services/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -425,11 +425,9 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
private BroadcastReceiver mScreenReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- synchronized (mRulesLock) {
- // screen-related broadcasts are protected by system, no need
- // for permissions check.
- mHandler.obtainMessage(MSG_SCREEN_ON_CHANGED).sendToTarget();
- }
+ // screen-related broadcasts are protected by system, no need
+ // for permissions check.
+ mHandler.obtainMessage(MSG_SCREEN_ON_CHANGED).sendToTarget();
}
};
diff --git a/services/java/com/android/server/net/NetworkStatsService.java b/services/java/com/android/server/net/NetworkStatsService.java
index 546f2be..74be472 100644
--- a/services/java/com/android/server/net/NetworkStatsService.java
+++ b/services/java/com/android/server/net/NetworkStatsService.java
@@ -940,14 +940,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
}
private void performPoll(int flags) {
+ // try refreshing time source when stale
+ if (mTime.getCacheAge() > mSettings.getTimeCacheMaxAge()) {
+ mTime.forceRefresh();
+ }
+
synchronized (mStatsLock) {
mWakeLock.acquire();
- // try refreshing time source when stale
- if (mTime.getCacheAge() > mSettings.getTimeCacheMaxAge()) {
- mTime.forceRefresh();
- }
-
try {
performPollLocked(flags);
} finally {
diff --git a/services/java/com/android/server/updates/CertPinInstallReceiver.java b/services/java/com/android/server/updates/CertPinInstallReceiver.java
new file mode 100644
index 0000000..c03fbc3
--- /dev/null
+++ b/services/java/com/android/server/updates/CertPinInstallReceiver.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.updates;
+
+public class CertPinInstallReceiver extends ConfigUpdateInstallReceiver {
+
+ public CertPinInstallReceiver() {
+ super("/data/misc/keychain/", "pins", "metadata/", "version");
+ }
+}
diff --git a/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java b/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java
index 4480151..4480151 100644
--- a/services/java/com/android/server/updatable/ConfigUpdateInstallReceiver.java
+++ b/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 5b9fc9a..0466c15 100755..100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -4153,8 +4153,7 @@ public class WindowManagerService extends IWindowManager.Stub
mStartingIconInTransition = false;
mSkipAppTransitionAnimation = false;
mH.removeMessages(H.APP_TRANSITION_TIMEOUT);
- mH.sendMessageDelayed(mH.obtainMessage(H.APP_TRANSITION_TIMEOUT),
- 5000);
+ mH.sendEmptyMessageDelayed(H.APP_TRANSITION_TIMEOUT, 5000);
}
}
}
@@ -4725,8 +4724,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mAppsFreezingScreen == 1) {
startFreezingDisplayLocked(false, 0, 0);
mH.removeMessages(H.APP_FREEZE_TIMEOUT);
- mH.sendMessageDelayed(mH.obtainMessage(H.APP_FREEZE_TIMEOUT),
- 5000);
+ mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 5000);
}
}
final int N = wtoken.allAppWindows.size();
@@ -5246,8 +5244,7 @@ public class WindowManagerService extends IWindowManager.Stub
try {
startFreezingDisplayLocked(false, exitAnim, enterAnim);
mH.removeMessages(H.CLIENT_FREEZE_TIMEOUT);
- mH.sendMessageDelayed(mH.obtainMessage(H.CLIENT_FREEZE_TIMEOUT),
- 5000);
+ mH.sendEmptyMessageDelayed(H.CLIENT_FREEZE_TIMEOUT, 5000);
} finally {
Binder.restoreCallingIdentity(origId);
}
@@ -5375,7 +5372,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
// Persist setting
- mH.obtainMessage(H.PERSIST_ANIMATION_SCALE).sendToTarget();
+ mH.sendEmptyMessage(H.PERSIST_ANIMATION_SCALE);
}
public void setAnimationScales(float[] scales) {
@@ -5397,7 +5394,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
// Persist setting
- mH.obtainMessage(H.PERSIST_ANIMATION_SCALE).sendToTarget();
+ mH.sendEmptyMessage(H.PERSIST_ANIMATION_SCALE);
}
private void setAnimatorDurationScale(float scale) {
@@ -5507,8 +5504,7 @@ public class WindowManagerService extends IWindowManager.Stub
hideBootMessagesLocked();
// If the screen still doesn't come up after 30 seconds, give
// up and turn it on.
- Message msg = mH.obtainMessage(H.BOOT_TIMEOUT);
- mH.sendMessageDelayed(msg, 30*1000);
+ mH.sendEmptyMessageDelayed(H.BOOT_TIMEOUT, 30*1000);
}
mPolicy.systemBooted();
@@ -5531,7 +5527,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (!mSystemBooted && !mShowingBootMessages) {
return;
}
- mH.sendMessage(mH.obtainMessage(H.ENABLE_SCREEN));
+ mH.sendEmptyMessage(H.ENABLE_SCREEN);
}
public void performBootTimeout() {
@@ -6107,7 +6103,7 @@ public class WindowManagerService extends IWindowManager.Stub
mWindowsFreezingScreen = true;
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
- mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT),
+ mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT,
WINDOW_FREEZE_TIMEOUT_DURATION);
mWaitingForConfig = true;
getDefaultDisplayContentLocked().layoutNeeded = true;
@@ -7636,8 +7632,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mAnimator.mAnimating || mLayoutToAnim.mAnimationScheduled) {
// If we are animating, don't do the gc now but
// delay a bit so we don't interrupt the animation.
- mH.sendMessageDelayed(mH.obtainMessage(H.FORCE_GC),
- 2000);
+ sendEmptyMessageDelayed(H.FORCE_GC, 2000);
return;
}
// If we are currently rotating the display, it will
@@ -7762,7 +7757,7 @@ public class WindowManagerService extends IWindowManager.Stub
// Used to send multiple changes from the animation side to the layout side.
synchronized (mWindowMap) {
if (copyAnimToLayoutParamsLocked()) {
- mH.sendEmptyMessage(CLEAR_PENDING_ACTIONS);
+ sendEmptyMessage(CLEAR_PENDING_ACTIONS);
performLayoutAndPlaceSurfacesLocked();
}
}
@@ -8351,7 +8346,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mWindowsChanged && !mWindowChangeListeners.isEmpty()) {
mH.removeMessages(H.REPORT_WINDOWS_CHANGE);
- mH.sendMessage(mH.obtainMessage(H.REPORT_WINDOWS_CHANGE));
+ mH.sendEmptyMessage(H.REPORT_WINDOWS_CHANGE);
}
} catch (RuntimeException e) {
mInLayout = false;
@@ -8547,8 +8542,8 @@ public class WindowManagerService extends IWindowManager.Stub
// XXX should probably keep timeout from
// when we first froze the display.
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
- mH.sendMessageDelayed(mH.obtainMessage(
- H.WINDOW_FREEZE_TIMEOUT), WINDOW_FREEZE_TIMEOUT_DURATION);
+ mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT,
+ WINDOW_FREEZE_TIMEOUT_DURATION);
}
}
}
@@ -10225,8 +10220,7 @@ public class WindowManagerService extends IWindowManager.Stub
// processes holds on others can be released if they are
// no longer needed.
mH.removeMessages(H.FORCE_GC);
- mH.sendMessageDelayed(mH.obtainMessage(H.FORCE_GC),
- 2000);
+ mH.sendEmptyMessageDelayed(H.FORCE_GC, 2000);
mScreenFrozenLock.release();