summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2014-10-17 23:04:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-17 23:04:12 +0000
commitebb38bcc03a0f770d371b2ed997570572df7aed1 (patch)
tree341e7e7a6f89bbd97f0b2ef0fd80e34c6d042450
parent83fae208fee402d8a6a51362f99660f9a49bd5a4 (diff)
parentcd2b54e6e546099e028f9e41966ab7cf1deedd3c (diff)
downloadframeworks_base-ebb38bcc03a0f770d371b2ed997570572df7aed1.zip
frameworks_base-ebb38bcc03a0f770d371b2ed997570572df7aed1.tar.gz
frameworks_base-ebb38bcc03a0f770d371b2ed997570572df7aed1.tar.bz2
am cd2b54e6: Merge "Accessibility no longer overrides strong encryption." into lmp-dev
* commit 'cd2b54e6e546099e028f9e41966ab7cf1deedd3c': Accessibility no longer overrides strong encryption.
-rw-r--r--core/java/android/view/AccessibilityManagerInternal.java31
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java29
-rw-r--r--services/core/java/com/android/server/MountService.java16
3 files changed, 1 insertions, 75 deletions
diff --git a/core/java/android/view/AccessibilityManagerInternal.java b/core/java/android/view/AccessibilityManagerInternal.java
deleted file mode 100644
index 7bb2dc5..0000000
--- a/core/java/android/view/AccessibilityManagerInternal.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2014 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 android.view;
-
-/**
- * Accessibility manager local system service interface.
- *
- * @hide Only for use within the system server.
- */
-public abstract class AccessibilityManagerInternal {
-
- /**
- * Queries if the accessibility manager service permits setting
- * a non-default encryption password.
- */
- public abstract boolean isNonDefaultEncryptionPasswordAllowed();
-}
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 8ef5b04..0fe7a4b 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -67,7 +67,6 @@ import android.util.Pools.Pool;
import android.util.Pools.SimplePool;
import android.util.Slog;
import android.util.SparseArray;
-import android.view.AccessibilityManagerInternal;
import android.view.Display;
import android.view.IWindow;
import android.view.InputDevice;
@@ -235,7 +234,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
registerBroadcastReceivers();
new AccessibilityContentObserver(mMainHandler).register(
context.getContentResolver());
- LocalServices.addService(AccessibilityManagerInternal.class, new LocalService());
}
private UserState getUserStateLocked(int userId) {
@@ -1331,7 +1329,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
updateTouchExplorationLocked(userState);
updateEnhancedWebAccessibilityLocked(userState);
updateDisplayColorAdjustmentSettingsLocked(userState);
- updateEncryptionState(userState);
scheduleUpdateInputFilter(userState);
scheduleUpdateClientsIfNeededLocked(userState);
}
@@ -1608,22 +1605,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
DisplayAdjustmentUtils.applyAdjustments(mContext, userState.mUserId);
}
- private void updateEncryptionState(UserState userState) {
- if (userState.mUserId != UserHandle.USER_OWNER) {
- return;
- }
- final long identity = Binder.clearCallingIdentity();
- try {
- if (hasRunningServicesLocked(userState) && LockPatternUtils.isDeviceEncrypted()) {
- // If there are running accessibility services we do not have encryption as
- // the user needs the accessibility layer to be running to authenticate.
- mLockPatternUtils.clearEncryptionPassword();
- }
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
- }
-
private boolean hasRunningServicesLocked(UserState userState) {
return !userState.mBoundServices.isEmpty() || !userState.mBindingServices.isEmpty();
}
@@ -3969,14 +3950,4 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
}
}
}
-
- private final class LocalService extends AccessibilityManagerInternal {
- @Override
- public boolean isNonDefaultEncryptionPasswordAllowed() {
- synchronized (mLock) {
- UserState userState = getCurrentUserStateLocked();
- return !hasRunningServicesLocked(userState);
- }
- }
- }
}
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 976e707..24d81a0 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -63,7 +63,6 @@ import android.util.AttributeSet;
import android.util.Slog;
import android.util.Xml;
-import android.view.AccessibilityManagerInternal;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IMediaContainerService;
@@ -558,8 +557,6 @@ class MountService extends IMountService.Stub
private final Handler mHandler;
- private final AccessibilityManagerInternal mAccessibilityManagerInternal;
-
void waitForAsecScan() {
waitForLatch(mAsecsScanned);
}
@@ -1462,9 +1459,6 @@ class MountService extends IMountService.Stub
hthread.start();
mHandler = new MountServiceHandler(hthread.getLooper());
- mAccessibilityManagerInternal = LocalServices.getService(
- AccessibilityManagerInternal.class);
-
// Watch for user changes
final IntentFilter userFilter = new IntentFilter();
userFilter.addAction(Intent.ACTION_USER_ADDED);
@@ -2263,16 +2257,8 @@ class MountService extends IMountService.Stub
Slog.i(TAG, "changing encryption password...");
}
- final NativeDaemonEvent event;
try {
- // The accessibility layer may veto having a non-default encryption
- // password because if there are enabled accessibility services the
- // user cannot authenticate as the latter need access to the data.
- if (!TextUtils.isEmpty(password)
- && !mAccessibilityManagerInternal.isNonDefaultEncryptionPasswordAllowed()) {
- return getEncryptionState();
- }
- event = mConnector.execute("cryptfs", "changepw", CRYPTO_TYPES[type],
+ NativeDaemonEvent event = mConnector.execute("cryptfs", "changepw", CRYPTO_TYPES[type],
new SensitiveArg(toHex(password)));
return Integer.parseInt(event.getMessage());
} catch (NativeDaemonConnectorException e) {