Fix device administrator "add" logic

Due to a missing "else" the logic to activate a device administrator
was immediately falling through into the logic to remove it.  As a result,
the add was immediately countermanded by a remove.
This commit is contained in:
Andrew Stadler
2010-02-05 01:00:13 -08:00
parent c4e8d7e21a
commit 4df6edb1ac

View File

@@ -140,7 +140,7 @@ public class DeviceAdminAdd extends Activity {
mDPM.setActiveAdmin(mDeviceAdmin.getComponent()); mDPM.setActiveAdmin(mDeviceAdmin.getComponent());
setResult(Activity.RESULT_OK); setResult(Activity.RESULT_OK);
finish(); finish();
} } else {
mDPM.getRemoveWarning(mDeviceAdmin.getComponent(), mDPM.getRemoveWarning(mDeviceAdmin.getComponent(),
new RemoteCallback(mHandler) { new RemoteCallback(mHandler) {
@Override @Override
@@ -159,6 +159,7 @@ public class DeviceAdminAdd extends Activity {
} }
}); });
} }
}
}); });
} }