cmsdk: LiveDisplay: Enforce dump permission

Fixes android.security.cts.ServicePermissionsTest#testDumpProtected.

Change-Id: I5641b42c56d9783b1edb8fb397d51040cadb1467
This commit is contained in:
Diogo Ferreira 2016-06-07 16:17:15 +01:00 committed by Gerrit Code Review
parent 705890212d
commit 19de84cd1b

View File

@ -468,6 +468,8 @@ public class LiveDisplayService extends CMSystemService {
@Override @Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
pw.println(); pw.println();
pw.println("LiveDisplay Service State:"); pw.println("LiveDisplay Service State:");
pw.println(" mState=" + mState.toString()); pw.println(" mState=" + mState.toString());