Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a6588b4 authored by Joe Onorato's avatar Joe Onorato Committed by Android Git Automerger
Browse files

am 6371a2d3: am ee3bbefd: Merge "Don\'t crash the system process when apps...

am 6371a2d3: am ee3bbefd: Merge "Don\'t crash the system process when apps give us a bad foreground service notification." into eclair

Merge commit '6371a2d3'

* commit '6371a2d3':
  Don't crash the system process when apps give us a bad foreground service notification.
parents f59a3c14 6371a2d3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
import android.util.Log;

import java.io.PrintWriter;
import java.util.ArrayList;
@@ -267,6 +268,9 @@ class ServiceRecord extends Binder {
                        int[] outId = new int[1];
                        inm.enqueueNotification(localPackageName, localForegroundId,
                                localForegroundNoti, outId);
                    } catch (RuntimeException e) {
                        Log.w(ActivityManagerService.TAG, "Error showing notification for service",
                            e);
                    } catch (RemoteException e) {
                    }
                }
@@ -288,6 +292,9 @@ class ServiceRecord extends Binder {
                    }
                    try {
                        inm.cancelNotification(localPackageName, localForegroundId);
                    } catch (RuntimeException e) {
                        Log.w(ActivityManagerService.TAG, "Error canceling notification for"
                            + " service", e);
                    } catch (RemoteException e) {
                    }
                }