set MAX_HIDDEN_APPS based on memory - CM

Change-Id: Ia6cffd9b989f51645db3531dca64819e0ef380fe