Loading core/java/android/app/Notification.java +56 −42 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading Loading @@ -3023,6 +3024,9 @@ public class Notification implements Parcelable * @hide */ public String loadHeaderAppName(Context context) { Trace.beginSection("Notification#loadHeaderAppName"); try { CharSequence name = null; // Check if there is a non-empty substitute app name and return that. if (extras.containsKey(EXTRA_SUBSTITUTE_APP_NAME)) { Loading @@ -3038,7 +3042,8 @@ public class Notification implements Parcelable final PackageManager pm = context.getPackageManager(); if (TextUtils.isEmpty(name)) { if (extras.containsKey(EXTRA_BUILDER_APPLICATION_INFO)) { final ApplicationInfo info = extras.getParcelable(EXTRA_BUILDER_APPLICATION_INFO, final ApplicationInfo info = extras.getParcelable( EXTRA_BUILDER_APPLICATION_INFO, ApplicationInfo.class); if (info != null) { name = pm.getApplicationLabel(info); Loading @@ -3054,6 +3059,9 @@ public class Notification implements Parcelable return null; } return name.toString(); } finally { Trace.endSection(); } } /** Loading Loading @@ -6722,6 +6730,9 @@ public class Notification implements Parcelable */ @NonNull public static Notification.Builder recoverBuilder(Context context, Notification n) { Trace.beginSection("Notification.Builder#recoverBuilder"); try { // Re-create notification context so we can access app resources. ApplicationInfo applicationInfo = n.extras.getParcelable( EXTRA_BUILDER_APPLICATION_INFO, ApplicationInfo.class); Loading @@ -6739,6 +6750,9 @@ public class Notification implements Parcelable } return new Builder(builderContext, n); } finally { Trace.endSection(); } } /** Loading Loading
core/java/android/app/Notification.java +56 −42 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading Loading @@ -3023,6 +3024,9 @@ public class Notification implements Parcelable * @hide */ public String loadHeaderAppName(Context context) { Trace.beginSection("Notification#loadHeaderAppName"); try { CharSequence name = null; // Check if there is a non-empty substitute app name and return that. if (extras.containsKey(EXTRA_SUBSTITUTE_APP_NAME)) { Loading @@ -3038,7 +3042,8 @@ public class Notification implements Parcelable final PackageManager pm = context.getPackageManager(); if (TextUtils.isEmpty(name)) { if (extras.containsKey(EXTRA_BUILDER_APPLICATION_INFO)) { final ApplicationInfo info = extras.getParcelable(EXTRA_BUILDER_APPLICATION_INFO, final ApplicationInfo info = extras.getParcelable( EXTRA_BUILDER_APPLICATION_INFO, ApplicationInfo.class); if (info != null) { name = pm.getApplicationLabel(info); Loading @@ -3054,6 +3059,9 @@ public class Notification implements Parcelable return null; } return name.toString(); } finally { Trace.endSection(); } } /** Loading Loading @@ -6722,6 +6730,9 @@ public class Notification implements Parcelable */ @NonNull public static Notification.Builder recoverBuilder(Context context, Notification n) { Trace.beginSection("Notification.Builder#recoverBuilder"); try { // Re-create notification context so we can access app resources. ApplicationInfo applicationInfo = n.extras.getParcelable( EXTRA_BUILDER_APPLICATION_INFO, ApplicationInfo.class); Loading @@ -6739,6 +6750,9 @@ public class Notification implements Parcelable } return new Builder(builderContext, n); } finally { Trace.endSection(); } } /** Loading