Android 5.0 is released not long ago and Google is already working on the next version of Android which is Android M. While Android 5.0 comes with some changes on the visual appearance of the user-interface, Android M will be the new cut-off point for the Nexus smartphones. This means that only Nexus devices which are released in a certain year will get the guaranteed update while the Nexus devices which are released before the year will stays at Android 5.0 Lollipop.
Apparently, Google will release Android M together with the launch of new Nexus device. The rule is that Nexus device will get major system updates for two years and security patches for three years from the OS release date.
As we all know, there are a lot of versions of Nexus which was released in different years. Nexus 4, Nexus 10 and Nexus 7 2012 for example, will not get Android M but the devices will get security updates for a little longer. The N7 2012 on the other hand,s at the very end of the rope. N4 and N10 which was released in November 2012 will not get the Android M since it past the two years OS cutoff.
Nexus 4 was released in Fall 2013, therefore the support for N4 will end this fall. Nexus 10 was out in Fall 2014 along with 2013 N7, therefore, it will get security updates until early 2016. The 2012 N7 came out in summer 2012 but was dropped after a year, therefore it will not get the Android M update, but the security patches will end in this summer. The 2013 N7 will have system updates until this summer with the security patches updates will last until next summer.
It is rumored that Android M will be launched in October this year.