Definition of complexity classes?
You seem to be confusing languages and strings.

An algorithm that decides a language&nbsp;$L$ is an algorithm whose input is a string&nbsp;$w$ and whose output is true if $w\in L$ and false if $w\notin L$.  As such, an algorithm can only decide one language: specifically, the language
$$L_A = \{w\mid A(w)=\mathrm{true}\}\,.$$

So, when you say, "then $A$ would decide all $L$", you're making a category error. An algorithm cannot possibly decide more than one language. What you've described is an algorithm that outputs true for every input: in other worse, an algorithm that decides the language $\{0,1\}^*$.

Note that $A$ decides a language by taking strings as inputs; it doesn't take languages as input and decide whether that langauge is in&nbsp;P.