OSDN Git Service

Don't crash when checking if components are protected
authorGabriele M <moto.falcon.git@gmail.com>
Mon, 25 Sep 2017 09:29:38 +0000 (11:29 +0200)
committerGabriele M <moto.falcon.git@gmail.com>
Mon, 25 Sep 2017 09:32:03 +0000 (11:32 +0200)
commitf20f3c082f9a449c007ddf5c04d0b70d8b96c90e
treeaf7e460ff909b818bf51ab18d9b6a8fa6309504e
parent9c27190883a88931d8497e3f97eec26ddf0c2d55
Don't crash when checking if components are protected

intent.getComponent() can be null, but isComponentProtected() expects
a valid object. Add a null pointer check and don't treat the app as
protected if null.

Fixes 15360dfe60a2c81187e4edcaf08679100260e2f9
("Always hide protected apps from the recent tasks list")

Change-Id: I2e0ccdfb9ded7aa32305bc2ac97e0950940d186b
services/core/java/com/android/server/am/ActivityStarter.java