Astra boy/Bender
Everyone knows that each new version of Android gets a code name on the theme of sweets and they are assigned in alphabetical order (Cupcake, Donut, Eclair, etc.).
However, initially, the developers planned to give versions of the name using the fictitious names of robots. Therefore, the first versions of Android were called Astra boy and Bender . These were internal releases before the release of the nameless version 1.0. However, for certain reasons, the vector changed and version 1.1 was decided to call Petit Four . This was the first sweet version of Android. And already starting with the next version (Cupcake 1.5), the names began to be assigned observing the alphabetical order.
A source
Marshmallow
With the release of API 23 (Marshmallow), Android introduced a new concept of runtime permissions . This feature was supposed to add transparency for users to the permissions granted to the application. Prior to the release of the “marshmallow”, the issuance of permits occurred at the time of installation of the application.
A source
Note that Android contains over 100 unique permissions.
measure()
measure () is called to determine the size requirements of the View and all its child elements.
onMeasure () - called from measure () to do the actual work of determining the size of the View.
onLayout () - called to position the element inside the container
onDraw () - called to render the View content.
More information on rendering View can be found here .
isUserSmell()
There is no isUserSmell () method in the SDK. Perhaps in the future, with the appearance on the devices of the respective sensors ...
Let us examine what other methods do:
isUserMonkey () - the method is designed to check whether the user is a test one within the automated monkey test.
isUserAGoat () - since API 21, checks if the Goat Simulator GoatZ (“Goat Simulator”) application is installed. On versions below, the method always returns false. Located in the classandroid.os.UserManager
.
isFinalCountdown () - the method opens the Europa clip “The Final Countdown”. Added it to API 26. Located in theandroid.widget.Chronometer
class.
private static final int mobius = 2018
This checked the knowledge of theconst
keyword, which is used to declarecompile time constants
. In the Java world, this corresponds tostatic final
modifiers.
sdpi
If xhdpi and mdpi are at the ear of developers, then things are different with tvdpi . It did not gain popularity, and therefore there were very few devices in the tvdpi category, but they were. The most famous of them is Nexus 7 (2012).
Source of
Note that tvdpi has a coefficient of 1.3 relative to mdpi.
apk
AAPT (Android Asset Packaging Tool) is an Android tool for creating .APK files.
Conventionally, the work of this utility can be divided into two stages:
- Compilation. At this stage, resources are being prepared: class R is being generated, XML resources are being converted to binary format, PNG processing, etc.
- Packaging (linking). All intermediate files created at compile time are packaged in an APK.
As for the rest of the answer:
- obfuscation code is usually engaged in proguard.
- Java bytecode is the result of the Java Compiler, which translates the source code into Java bytecode.
- Dalvik bytecode is the result of the Dalvik Compiler (DX, D8), which translates .class (Java bytecode) to .dex (Dalvik bytecode). The source code in Dalvik bytecode is not translated directly.
The process of building an Android application is in general terms described in the documentation .
RIGHT OUTER JOIN
Of these, RIGHT OUTER JOIN is not supported.
Source of
2x
Name Density ldpi 0.75 mdpi one tvdpi 1.3 hdpi 1.5 xhdpi 2 xxhdpi 3 and 2.6 xxxhdpi 4 and 3.5
ART
ART (Android Runtime) is a new DEX bytecode runtime that replaces Dalvik. The most significant difference between Dalvik and ART is that Dalvik is based on the JIT ( Just-in-Time ) compilation, while ART is based on AOT ( Ahead-of-Time ). In general terms, this means that Dalvik translates dalvik bytecode into machine code every time the application is executed, and ART does it once, during the installation of the application, storing the result in the device’s memory. This leads to the fact that on ART there is a faster launch and execution of applications compared with Dalvik, but this increases the installation time of the application. In addition, ART conducted GC optimization, and also added a number of features to improve the development and debugging of applications.
ART and Dalvik
In addition, it is worth noting that ART also includes a JIT compiler, which complements AOT. Read more about it here .
YAGNI
KISS (Keep It Simple, Stupid) - do not complicate!
DRY (Don't repeat yourself), DIE (Duplication Is Evil) - do not repeat!
WTF (number of “chesana” per second) is a measure of the quality of a code for a review.
YAGNI (You are not gonna need it) - you will not need it!
Application Not Responding
ANR (Application Not Responding) - a problem that occurs when the main flow of the application cannot handle user events and redraw the UI.
In Android, the application’s responsiveness is monitored by theActivityManager
andWindowManager
system services. If one of the following conditions is met:
- there is no reaction to input events (touch and key pressed events),
- BroadcastReceiver will not complete execution within 10 seconds,
the system will notify the user of the problem by displaying the corresponding ANR dialog.
Size & mode
MeasureSpec is designed to transfer size requirements from the parent to child view components. These requirements are drawn up in two dimensions: width and height. The values ​​for each of the dimensions are composite: the first part contains information about the available space (in pixels), the second part - restrictions on the use of available space. These restrictions may be as follows:
MeasureSpec.UNSPECIFIED — no limit, the view can take on any size it needs.
MeasureSpec.EXACTLY - the exact dimensions are defined, the view will be given exactly these boundaries.
MeasureSpec.AT_MOST - maximum sizes are defined. The view can be as large as it wants, but to the specified size.
Linux Kernel
Linux Kernel (Linux kernel) - this layer provides the functioning of the system and is responsible for security, memory management, processes, and also provides a network stack and driver model (Display Driver, Camera Driver and other drivers).
Libraries (libraries) is an intermediate software layer designed to provide basic functionality for applications such as supporting file formats, encoding and decoding information (for example, codecs), drawing graphics, and much more (Surface Manager, Media Framework, SQLite and others).
Android Runtime - located on the same level with Libraries. The key components here are Dalvik VM and a number of core libraries (Core Libraries).
Application Framework - application framework level. It is through application frameworks that developers get access to the lower-level APIs. These include: ActivityManager, Package Manager, Window Manager, etc.
Applications - the level of applications, both basic (pre-installed on the OS: browser, calendar, contacts, etc.) and user-installed.
To the note, the authors of quiz oldscules, because in the official documentation, the layers are highlighted in another way: source.android.com/devices/architecture .
invokeabstract
goto - go to another instruction.
invokeinterface - used to call interface methods.
invokestatic - used to call static methods.
Description of the remaining instructions .
Source: https://habr.com/ru/post/434210/
All Articles