Skip to content

Commit

Permalink
Fix the issue that App crash on startForeground.
Browse files Browse the repository at this point in the history
Install single APP in any user space except Owner user, the APP
got crash when call startForeground in Service Component with
Notification which without SmallIcon.

bug:https://code.google.com/p/android/issues/detail?id=209043

Change-Id: I88a3b8afc213cafe0f280f9b44d6acd2ea0df207
Signed-off-by: Wang Le <wangle@xiaomi.com>
  • Loading branch information
Wang Le committed May 5, 2016
1 parent 683168c commit 179ebbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/core/java/com/android/server/am/ServiceRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ public void run() {
}
Context ctx = null;
try {
ctx = ams.mContext.createPackageContext(
appInfo.packageName, 0);
ctx = ams.mContext.createPackageContextAsUser(
appInfo.packageName, 0, new UserHandle(userId));

Notification.Builder notiBuilder = new Notification.Builder(ctx);

Expand Down

0 comments on commit 179ebbe

Please sign in to comment.