Loading core/java/android/app/ActivityManagerNative.java +17 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,13 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); dismissKeyguardOnNextActivity(); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -3504,5 +3511,15 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public void dismissKeyguardOnNextActivity() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); mRemote.transact(DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } private IBinder mRemote; } core/java/android/app/IActivityManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,8 @@ public interface IActivityManager extends IInterface { public void showBootMessage(CharSequence msg, boolean always) throws RemoteException; public void dismissKeyguardOnNextActivity() throws RemoteException; /* * Private non-Binder interfaces */ Loading Loading @@ -602,4 +604,5 @@ public interface IActivityManager extends IInterface { int UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+135; int GET_PROCESS_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+136; int SHOW_BOOT_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+137; int DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+138; } core/java/android/content/Intent.java +19 −19 Original line number Diff line number Diff line Loading @@ -5580,21 +5580,32 @@ public class Intent implements Parcelable, Cloneable { StringBuilder b = new StringBuilder(128); b.append("Intent { "); toShortString(b, true, true); toShortString(b, true, true, true); b.append(" }"); return b.toString(); } /** @hide */ public String toShortString(boolean comp, boolean extras) { public String toInsecureString() { StringBuilder b = new StringBuilder(128); toShortString(b, comp, extras); b.append("Intent { "); toShortString(b, false, true, true); b.append(" }"); return b.toString(); } /** @hide */ public void toShortString(StringBuilder b, boolean comp, boolean extras) { public String toShortString(boolean secure, boolean comp, boolean extras) { StringBuilder b = new StringBuilder(128); toShortString(b, secure, comp, extras); return b.toString(); } /** @hide */ public void toShortString(StringBuilder b, boolean secure, boolean comp, boolean extras) { boolean first = true; if (mAction != null) { b.append("act=").append(mAction); Loading @@ -5621,19 +5632,8 @@ public class Intent implements Parcelable, Cloneable { } first = false; b.append("dat="); String scheme = mData.getScheme(); if (scheme != null) { if (scheme.equalsIgnoreCase("tel")) { b.append("tel:xxx-xxx-xxxx"); } else if (scheme.equalsIgnoreCase("sip")) { b.append("sip:xxxxxxxxxx"); } else if (scheme.equalsIgnoreCase("sms")) { b.append("sms:xxx-xxx-xxxx"); } else if (scheme.equalsIgnoreCase("smsto")) { b.append("smsto:xxx-xxx-xxxx"); } else { b.append(mData); } if (secure) { b.append(mData.toSafeString()); } else { b.append(mData); } Loading core/java/android/net/Uri.java +42 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,48 @@ public abstract class Uri implements Parcelable, Comparable<Uri> { */ public abstract String toString(); /** * Return a string representation of the URI that is safe to print * to logs and other places where PII should be avoided. * @hide */ public String toSafeString() { String scheme = getScheme(); String ssp = getSchemeSpecificPart(); if (scheme != null) { if (scheme.equalsIgnoreCase("tel") || scheme.equalsIgnoreCase("sip") || scheme.equalsIgnoreCase("sms") || scheme.equalsIgnoreCase("smsto") || scheme.equalsIgnoreCase("mailto")) { StringBuilder builder = new StringBuilder(64); builder.append(scheme); builder.append(':'); if (ssp != null) { for (int i=0; i<ssp.length(); i++) { char c = ssp.charAt(i); if (c == '-' || c == '@' || c == '.') { builder.append(c); } else { builder.append('x'); } } } return builder.toString(); } } // Not a sensitive scheme, but let's still be conservative about // the data we include -- only the ssp, not the query params or // fragment, because those can often have sensitive info. StringBuilder builder = new StringBuilder(64); if (scheme != null) { builder.append(scheme); builder.append(':'); } if (ssp != null) { builder.append(ssp); } return builder.toString(); } /** * Constructs a new builder, copying the attributes from this Uri. */ Loading core/java/android/view/IWindowManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ interface IWindowManager boolean isKeyguardLocked(); boolean isKeyguardSecure(); boolean inKeyguardRestrictedInputMode(); void dismissKeyguard(); void closeSystemDialogs(String reason); Loading Loading
core/java/android/app/ActivityManagerNative.java +17 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,13 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } case DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); dismissKeyguardOnNextActivity(); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -3504,5 +3511,15 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public void dismissKeyguardOnNextActivity() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); mRemote.transact(DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } private IBinder mRemote; }
core/java/android/app/IActivityManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,8 @@ public interface IActivityManager extends IInterface { public void showBootMessage(CharSequence msg, boolean always) throws RemoteException; public void dismissKeyguardOnNextActivity() throws RemoteException; /* * Private non-Binder interfaces */ Loading Loading @@ -602,4 +604,5 @@ public interface IActivityManager extends IInterface { int UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+135; int GET_PROCESS_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+136; int SHOW_BOOT_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+137; int DISMISS_KEYGUARD_ON_NEXT_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+138; }
core/java/android/content/Intent.java +19 −19 Original line number Diff line number Diff line Loading @@ -5580,21 +5580,32 @@ public class Intent implements Parcelable, Cloneable { StringBuilder b = new StringBuilder(128); b.append("Intent { "); toShortString(b, true, true); toShortString(b, true, true, true); b.append(" }"); return b.toString(); } /** @hide */ public String toShortString(boolean comp, boolean extras) { public String toInsecureString() { StringBuilder b = new StringBuilder(128); toShortString(b, comp, extras); b.append("Intent { "); toShortString(b, false, true, true); b.append(" }"); return b.toString(); } /** @hide */ public void toShortString(StringBuilder b, boolean comp, boolean extras) { public String toShortString(boolean secure, boolean comp, boolean extras) { StringBuilder b = new StringBuilder(128); toShortString(b, secure, comp, extras); return b.toString(); } /** @hide */ public void toShortString(StringBuilder b, boolean secure, boolean comp, boolean extras) { boolean first = true; if (mAction != null) { b.append("act=").append(mAction); Loading @@ -5621,19 +5632,8 @@ public class Intent implements Parcelable, Cloneable { } first = false; b.append("dat="); String scheme = mData.getScheme(); if (scheme != null) { if (scheme.equalsIgnoreCase("tel")) { b.append("tel:xxx-xxx-xxxx"); } else if (scheme.equalsIgnoreCase("sip")) { b.append("sip:xxxxxxxxxx"); } else if (scheme.equalsIgnoreCase("sms")) { b.append("sms:xxx-xxx-xxxx"); } else if (scheme.equalsIgnoreCase("smsto")) { b.append("smsto:xxx-xxx-xxxx"); } else { b.append(mData); } if (secure) { b.append(mData.toSafeString()); } else { b.append(mData); } Loading
core/java/android/net/Uri.java +42 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,48 @@ public abstract class Uri implements Parcelable, Comparable<Uri> { */ public abstract String toString(); /** * Return a string representation of the URI that is safe to print * to logs and other places where PII should be avoided. * @hide */ public String toSafeString() { String scheme = getScheme(); String ssp = getSchemeSpecificPart(); if (scheme != null) { if (scheme.equalsIgnoreCase("tel") || scheme.equalsIgnoreCase("sip") || scheme.equalsIgnoreCase("sms") || scheme.equalsIgnoreCase("smsto") || scheme.equalsIgnoreCase("mailto")) { StringBuilder builder = new StringBuilder(64); builder.append(scheme); builder.append(':'); if (ssp != null) { for (int i=0; i<ssp.length(); i++) { char c = ssp.charAt(i); if (c == '-' || c == '@' || c == '.') { builder.append(c); } else { builder.append('x'); } } } return builder.toString(); } } // Not a sensitive scheme, but let's still be conservative about // the data we include -- only the ssp, not the query params or // fragment, because those can often have sensitive info. StringBuilder builder = new StringBuilder(64); if (scheme != null) { builder.append(scheme); builder.append(':'); } if (ssp != null) { builder.append(ssp); } return builder.toString(); } /** * Constructs a new builder, copying the attributes from this Uri. */ Loading
core/java/android/view/IWindowManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ interface IWindowManager boolean isKeyguardLocked(); boolean isKeyguardSecure(); boolean inKeyguardRestrictedInputMode(); void dismissKeyguard(); void closeSystemDialogs(String reason); Loading