SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Carlo Pescio @CarloPescio http://aspectroid.com
Carlo Pescio
Evolving the Android Core
with Aspects
Carlo Pescio @CarloPescio http://aspectroid.com
Android on custom devices
New hardware:
- Ethernet
- TV tuner
- Modbus
Different target / product line / market:
- Not a “personal device”
- Keeping “user data” not an option
- USB devices should autostart apps w/out asking user
- Foreground app can’t win
- Change low memory policies
Android architecture
Looks familiar ? 
Carlo Pescio @CarloPescio http://aspectroid.com
AudioManager
int mBecomingNoisyIntentDevices =
AudioSystem.DEVICE_OUT_WIRED_HEADSET |
AudioSystem.DEVICE_OUT_WIRED_HEADPHONE |
AudioSystem.DEVICE_OUT_ALL_A2DP |
AudioSystem.DEVICE_OUT_HDMI |
AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET |
AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET |
AudioSystem.DEVICE_OUT_ALL_USB |
AudioSystem.DEVICE_OUT_LINE;
Carlo Pescio @CarloPescio http://aspectroid.com
AudioManager
private void onSetWiredDeviceConnectionState(int device, int state,
String name)
{
synchronized (mConnectedDevices) {
if((state == 0) && ((device == AudioSystem.DEVICE_OUT_WIRED_HEADSET) ||
(device == AudioSystem.DEVICE_OUT_WIRED_HEADPHONE)||
(device == AudioSystem.DEVICE_OUT_LINE))) {
setBluetoothA2dpOnInt(true);
}
boolean isUsb = ((device & ~AudioSystem.DEVICE_OUT_ALL_USB) == 0) ||
(((device & AudioSystem.DEVICE_BIT_IN) != 0) &&
((device & ~AudioSystem.DEVICE_IN_ALL_USB) == 0));
handleDeviceConnection((state == 1), device, (isUsb ? name : ""));
if (state != 0) {
if ((device == AudioSystem.DEVICE_OUT_WIRED_HEADSET) ||
(device == AudioSystem.DEVICE_OUT_WIRED_HEADPHONE) ||
(device == AudioSystem.DEVICE_OUT_LINE)) {
setBluetoothA2dpOnInt(false);
}
Carlo Pescio @CarloPescio http://aspectroid.com
Evolving open source code
Plugin architecture: lucky you
Or: just fork & change the damn code
pull + 3 way compare
‱ Feature / Artifact symmetry is broken
‱ Features are scattered in small patches
‱ Product families => multiple forks
Carlo Pescio @CarloPescio http://aspectroid.com
aspectroid
exploring the
aspect-oriented
design space
Carlo Pescio @CarloPescio http://aspectroid.com
Aspect Orientation
Born to address Cross-Cutting, Scattered Concerns
Error handling, Transaction handling
Not very successful so far
No design discipline evolved
Core features:
Customize behavior w/out changing code
Avoid scattering a single concern around
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ crash course
Inter-type declaration:
add data members, member functions,
implement interfaces, 

aspect ScreenStateSettingsAspect
{
private CheckBoxPreference
DevelopmentSettings.stayOnPreference;
}
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ crash course
Pointcut (the “where”)
identify matching parts of code
(sophisticated syntax)
pointcut settingsUpdated() :
execution( private void
PowerManagerService.updateStayOnLocked(int));
pointcut adbSet() :
within(UsbDeviceManager) &&
set(boolean *.mAdbEnabled);
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ crash course
Advice (the when and how)
execute code before / after / around code
matched by a pointcut (join point)
after(boolean newVal) :
adbSet() && args(newVal)
{
// do something here
}
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ crash course
Aspect
scoping mechanism; also: artifact
privileged aspect
ScreenStatePowerAspect {

 inter-type declarations

 pointcuts

 advices

 functions

 data
}
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ & Android
Apps: easy
download plugin, add AspectJ nature to project
Core: not so easy
Shell calling Makefiles calling Python calling make
Strong expectations (class files etc.)
AJC can compile regular Java files
aspects don’t need .aj extension, .java is ok
Carlo Pescio @CarloPescio http://aspectroid.com
AspectJ in the core
- Create a compiler wrapper around ajc in C
- Standardizes options and behavior
- Like: files in a file list must have absolute path
- Minimal changes to the build scripts
- If you link with the aspectjrt library, I call the compiler wrapper
- Applicable to other JVM languages
# C o m m o n d e f i n i t i o n t o i n v o k e j a v a c o n t h e h o s t a n d t a r g e t . # # S o m e h i s t o r i c a l n o t e s : # - b e l o w w e w r i t e t h e l i s t o f j a v a
f i l e s t o j a v a - s o u r c e - l i s t t o a v o i d a r g u m e n t # l i s t l e n g t h p r o b l e m s w i t h C y g w i n # - w e f i l t e r o u t d u p l i c a t e j a v a f i l e n a m e s
b e c a u s e e c l i p s e ' s c o m p i l e r # d o e s n ' t l i k e t h e m . # # $ ( 1 ) : j a v a c # $ ( 2 ) : b o o t c l a s s p a t h d e f i n e c o m p i l e - j a v a $ ( h i d e ) r m - f
$ @ $ ( h i d e ) r m - r f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) $ ( h i d e ) m k d i r - p $ ( d i r $ @ ) $ ( h i d e ) m k d i r - p
$ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) $ ( c a l l u n z i p - j a r - f i l e s , $ ( P R I V A T E _ S T A T I C _ J A V A _ L I B R A R I E S ) ,
$ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ) $ ( c a l l d u m p - w o r d s - t o - f i l e , $ ( P R I V A T E _ J A V A _ S O U R C E S ) , $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R )
/ j a v a - s o u r c e - l i s t ) $ ( h i d e ) i f [ - d " $ ( P R I V A T E _ S O U R C E _ I N T E R M E D I A T E S _ D I R ) " ] ; t h e n  f i n d
$ ( P R I V A T E _ S O U R C E _ I N T E R M E D I A T E S _ D I R ) - n a m e ' * . j a v a ' > > $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t ;  f i $ ( h i d e ) t r '
' '  n ' < $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t  | s o r t - u > $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a -
s o u r c e - l i s t - u n i q $ ( h i d e ) i f [ - s $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q ] ; t h e n  $ ( i f $ ( f i n d s t r i n g
a s p e c t j r t , $ ( P R I V A T E _ S T A T I C _ J A V A _ L I B R A R I E S ) ) , $ ( s u b s t j a v a c , a j c w , $ ( 1 ) ) , $ ( 1 ) ) - e n c o d i n g U T F - 8  $ ( s t r i p
$ ( P R I V A T E _ J A V A C _ D E B U G _ F L A G S ) )  $ ( i f $ ( f i n d s t r i n g t r u e , $ ( P R I V A T E _ W A R N I N G S _ E N A B L E ) ) , $ ( x l i n t _ u n c h e c k e d ) , )  $ ( 2 ) 
$ ( a d d p r e f i x - c l a s s p a t h , $ ( s t r i p  $ ( c a l l n o r m a l i z e - p a t h - l i s t , $ ( P R I V A T E _ A L L _ J A V A _ L I B R A R I E S ) ) ) )  $ ( i f
$ ( f i n d s t r i n g t r u e , $ ( P R I V A T E _ W A R N I N G S _ E N A B L E ) ) , $ ( x l i n t _ u n c h e c k e d ) , )  - e x t d i r s " " - d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R )
 $ ( P R I V A T E _ J A V A C F L A G S )   @ $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q  | | ( r m - r f
$ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ; e x i t 4 1 )  f i $ ( i f $ ( P R I V A T E _ J A V A _ L A Y E R S _ F I L E ) , $ ( h i d e ) b u i l d / t o o l s / j a v a - l a y e r s . p y 
$ ( P R I V A T E _ J A V A _ L A Y E R S _ F I L E )  @ $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q , ) $ ( h i d e ) r m - f
$ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t $ ( h i d e ) r m - f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t -
u n i q $ ( i f $ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) , $ ( h i d e ) f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R )  - n a m e $ ( w o r d 1 ,
$ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) )  $ ( a d d p r e f i x - o - n a m e , $ ( w o r d l i s t 2 , 9 9 9 , $ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) ) )  | x a r g s
r m - r f ) $ ( i f $ ( P R I V A T E _ J A R _ P A C K A G E S ) ,  $ ( h i d e ) f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) - m i n d e p t h 1 - t y p e f 
$ ( f o r e a c h p k g , $ ( P R I V A T E _ J A R _ P A C K A G E S ) ,  - n o t - p a t h $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / $ ( s u b s t . , / , $ ( p k g ) ) /  * )
- d e l e t e ;  f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) - e m p t y - d e l e t e ) $ ( i f $ ( P R I V A T E _ J A R _ E X C L U D E _ P A C K A G E S ) , $ ( h i d e ) r m
- r f  $ ( f o r e a c h p k g , $ ( P R I V A T E _ J A R _ E X C L U D E _ P A C K A G E S ) ,  $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / $ ( s u b s t
. , / , $ ( p k g ) ) ) ) $ ( i f $ ( P R I V A T E _ R M T Y P E D E F S ) , $ ( h i d e ) $ ( R M T Y P E D E F S ) - v $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ) $ ( i f
$ ( P R I V A T E _ J A R _ M A N I F E S T ) ,  $ ( h i d e ) s e d - e ' s / % B U I L D _ N U M B E R % / $ ( B U I L D _ N U M B E R ) / '  $ ( P R I V A T E _ J A R _ M A N I F E S T ) >
$ ( d i r $ @ ) / m a n i f e s t . m f & &  j a r - c f m $ @ $ ( d i r $ @ ) / m a n i f e s t . m f  - C $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) . ,
 $ ( h i d e ) j a r - c f $ @ - C $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) . ) e n d e f
AspectJ in the core
Definitions.mk -> define compile-java
$(if $(findstring aspectjrt,
$(PRIVATE_STATIC_JAVA_LIBRARIES)),
$(subst javac,ajcw,$(1)), $(1))
Does it actually work?
Add a useful feature without changing sources
Carlo Pescio @CarloPescio http://aspectroid.com
How do we start?
‱ Explore code
‱ “Stay on while charging”
‱ UsbDeviceManager, PowerManagerService
‱ See ebook for details on the quest
‱ Tested as much as possible outside the core
‱ See ebook again
‱ Add aspects
‱ Make aspects robust !
A map
A map
A map
A map
Carlo Pescio @CarloPescio http://aspectroid.com
Extend the Settings app
- Add a new checkbox
- Persist the checkbox state somewhere
- Show the persisted value on resume
Settings Aspect (1/3)
privileged aspect ScreenStateSettingsAspect
{
private CheckBoxPreference
DevelopmentSettings.stayOnPreference;
pointcut onCreateExecuted() :
execution(public void DevelopmentSettings.onCreate(..)) ;
pointcut onResumeExecuted() :
execution(public void DevelopmentSettings.onResume(..)) ;
Settings Aspect (2/3)
after(DevelopmentSettings self):onCreateExecuted()&&target(self)
{
final Context ctx = self.getActivity();
PreferenceCategory targetCategory = (PreferenceCategory)self.
findPreference(DevelopmentSettings.DEBUG_DEBUGGING_CATEGORY_KEY);
self.stayOnPreference = new CheckBoxPreference(ctx);
self.stayOnPreference.setKey("aspectroidScreenState");
self.stayOnPreference.setTitle("Prevent sleeping while debugging");
self.stayOnPreference.setSummary("only for usb debugging");
targetCategory.addPreference(self.stayOnPreference);
self.stayOnPreference.setOnPreferenceChangeListener(
new OnPreferenceChangeListener() {
public boolean onPreferenceChange(
Preference preference, Object newValue) {
API.persistPreference(ctx, (Boolean) newValue);
return true;
} }); }
Settings Aspect (3/3)
after(DevelopmentSettings self) : onResumeExecuted() &&
target(self)
{
final Context ctx = self.getActivity();
boolean on = API.retrievePreference(ctx);
self.stayOnPreference.setChecked(on);
}
}

Carlo Pescio @CarloPescio http://aspectroid.com
Am I debugging?
- USB debugging enabled
- USB connected to a computer
- Not just charging
- Not in OTG / host mode
Carlo Pescio @CarloPescio http://aspectroid.com
UsbDeviceManager
See ebook for details
USB Aspect (1/3)
aspect ScreenStateUsbAspect {
boolean adbEnabled = false;
boolean adbConnected = false;
Context context;
before(Context ctx):
execution(UsbDeviceManager.new(Context)) && args( ctx ) {
context = ctx;
}
USB Aspect (2/3)
pointcut adbSet() : within(UsbDeviceManager) &&
set(boolean *.mAdbEnabled);
after(boolean newVal) : adbSet() && args(newVal) {
adbEnabled = newVal;
checkAdbOn();
}
USB Aspect (3/3)
pointcut connectedSet() : within(UsbDeviceManager) &&
set(boolean *.mConnected);
after(boolean newVal) : connectedSet() && args(newVal) {
adbConnected = newVal;
checkAdbOn();
}
void checkAdbOn() {
boolean isOn = adbEnabled && adbConnected;
API.storeAdbState(context, isOn);
}
} 
PowerManagerService (1)
public void systemReady(IAppOpsService appOps) {
// 

final ContentResolver resolver =
mContext.getContentResolver();
// 

resolver.registerContentObserver(
Settings.Global.getUriFor(
Settings.Global.STAY_ON_WHILE_PLUGGED_IN),
false, mSettingsObserver, UserHandle.USER_ALL);
//

updateSettingsLocked();
//

}
PowerManagerService (2)
private void updateStayOnLocked(int dirty) {
if( (dirty &
(DIRTY_BATTERY_STATE | DIRTY_SETTINGS)) != 0 ) {
final boolean wasStayOn = mStayOn;
if( mStayOnWhilePluggedInSetting != 0 && !
isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()){
mStayOn = mBatteryManagerInternal.isPowered(
mStayOnWhilePluggedInSetting);
}
else {
mStayOn = false;
}
if( mStayOn != wasStayOn ) {
mDirty |= DIRTY_STAY_ON;
}
}
}
Power Aspect (1/2)
privileged aspect ScreenStatePowerAspect {
pointcut systemReadyExecuted() : execution(
public void PowerManagerService.systemReady(..));
after(PowerManagerService self) :
systemReadyExecuted() && target(self) {
API.registerScreenOnObserver(self.mContext,
self.mSettingsObserver);
}
Power Aspect (2/2)
pointcut settingsUpdated() : execution(
private void PowerManagerService.updateStayOnLocked(int));
void around(PowerManagerService self, int dirty) :
settingsUpdated() && args(dirty) && target(self) {
proceed(self, dirty);
boolean keepOn = API.shouldKeepScrenOn(self.mContext);
if( keepOn && !self.mStayOn ) {
self.mStayOn = true;
self.mDirty |= PowerManagerService.DIRTY_STAY_ON;
}
}
} 
Carlo Pescio @CarloPescio http://aspectroid.com
Is it worth doing?
Core of science: experiments & falsifiability
port the aspects
from 5.0 to 6.0
Hardest candidate: PowerManagerService
Power mgmt changed in 6.0 to include Doze
Also the most fragile of my aspects
Carlo Pescio @CarloPescio http://aspectroid.com
File compare map
5.0 vs 6.0
Carlo Pescio @CarloPescio http://aspectroid.com
Still working?
Class: PowerManagerService still there
Member functions:
systemReady
updateStayOnLocked
Data members:
mContext, mSettingsObserver,
mStayOn, mDirty
still there, same
purpose & signature
still there,
same purpose

Carlo Pescio @CarloPescio http://aspectroid.com
Conclusions: core benefits
- Feature traceability and selection
- Features as artifacts, not changesets
- Simplified maintenance / porting
Carlo Pescio @CarloPescio http://aspectroid.com
Challenges
Aspectj is still “one project at a time”
Core is not aspect-friendly
very long methods, hard to pointcut inside
Core itself would actually benefit A LOT from AOP
ok google? 
Rejection of the unfamiliar
3-way compare is a known pain
branch X product in a product family is a known pain
Carlo Pescio @CarloPescio http://aspectroid.com
Why learning this stuff?
- New ways to solve problems
Customize FOSS by adding code
- New ways to structure your code
aspect-friendly
mix OOP and AOP
- In the end:
you maintain LESS code
[good] aspects can be quite resilient
Carlo Pescio @CarloPescio http://aspectroid.com
Get in touch
carlo.pescio@gmail.com
@CarloPescio
http://eptacom.net
http://aspectroid.com

Weitere Àhnliche Inhalte

Was ist angesagt?

Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)James Titcumb
 
ពុទ្ធកិច្ច ៀោ ព្រះវស្សា
ពុទ្ធកិច្ច ៀោ ព្រះវស្សាពុទ្ធកិច្ច ៀោ ព្រះវស្សា
ពុទ្ធកិច្ច ៀោ ព្រះវស្សាVantha Kago
 
Analyse transactionnelle et publicité
Analyse transactionnelle et publicitéAnalyse transactionnelle et publicité
Analyse transactionnelle et publicitéFrançois Jourde
 
CFOT James Ferreira
CFOT James FerreiraCFOT James Ferreira
CFOT James FerreiraJames Ferreira
 
Thesis Abstract & Intro
Thesis Abstract & IntroThesis Abstract & Intro
Thesis Abstract & IntroAndrew Nash
 
Sthiem Report4 Rip
Sthiem Report4 RipSthiem Report4 Rip
Sthiem Report4 Ripguest62c54a
 
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33Guy Boulianne
 
Findes der millioner i velfĂŠrdsteknologi?
Findes der millioner i velfĂŠrdsteknologi?Findes der millioner i velfĂŠrdsteknologi?
Findes der millioner i velfĂŠrdsteknologi?Lakeside A/S
 
Piotr Szotkowski about "Ruby smells"
Piotr Szotkowski about "Ruby smells"Piotr Szotkowski about "Ruby smells"
Piotr Szotkowski about "Ruby smells"Pivorak MeetUp
 
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČ
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČàžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČ
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČàžȘàžČàžąàžàž™ àž•àčŠàž°àž§àž±àž™àž™àžČ
 

Was ist angesagt? (13)

Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)Interpret this... (PHPem 2016)
Interpret this... (PHPem 2016)
 
ពុទ្ធកិច្ច ៀោ ព្រះវស្សា
ពុទ្ធកិច្ច ៀោ ព្រះវស្សាពុទ្ធកិច្ច ៀោ ព្រះវស្សា
ពុទ្ធកិច្ច ៀោ ព្រះវស្សា
 
Uwp Constitution 1998 Edition
Uwp Constitution 1998 EditionUwp Constitution 1998 Edition
Uwp Constitution 1998 Edition
 
Analyse transactionnelle et publicité
Analyse transactionnelle et publicitéAnalyse transactionnelle et publicité
Analyse transactionnelle et publicité
 
CFOT James Ferreira
CFOT James FerreiraCFOT James Ferreira
CFOT James Ferreira
 
BA UC
BA UCBA UC
BA UC
 
Thesis Abstract & Intro
Thesis Abstract & IntroThesis Abstract & Intro
Thesis Abstract & Intro
 
Sthiem Report4 Rip
Sthiem Report4 RipSthiem Report4 Rip
Sthiem Report4 Rip
 
CAR Emails 6.7.02 (b)
CAR Emails 6.7.02 (b)CAR Emails 6.7.02 (b)
CAR Emails 6.7.02 (b)
 
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33
Le magazine Paranoia, Automne 2003. Vol 10, No 2, Issue 33
 
Findes der millioner i velfĂŠrdsteknologi?
Findes der millioner i velfĂŠrdsteknologi?Findes der millioner i velfĂŠrdsteknologi?
Findes der millioner i velfĂŠrdsteknologi?
 
Piotr Szotkowski about "Ruby smells"
Piotr Szotkowski about "Ruby smells"Piotr Szotkowski about "Ruby smells"
Piotr Szotkowski about "Ruby smells"
 
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČ
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČàžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČ
àžžàžŁàžš.àžȘàž àžČàž„àžŁàžčàčàž„àž°àžšàžžàž„àž„àžČàžàžŁàž—àžČàž‡àžàžČàžŁàžšàž¶àžàž©àžČ
 

Andere mochten auch

Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Kelly Shuster
 
Crafting Great Hypotheses - Droidcon 2016
Crafting Great Hypotheses - Droidcon 2016Crafting Great Hypotheses - Droidcon 2016
Crafting Great Hypotheses - Droidcon 2016Hoang Huynh
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...Alessandro Martellucci
 
Add ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxAdd ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxBoris Farber
 
Data Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternData Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternFabio Collini
 
Engage and retain users in the android world - Droidcon Italy 2016
Engage and retain users in the android world - Droidcon Italy 2016Engage and retain users in the android world - Droidcon Italy 2016
Engage and retain users in the android world - Droidcon Italy 2016Matteo Bonifazi
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeedYonatan Levin
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
 

Andere mochten auch (10)

Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
 
Crafting Great Hypotheses - Droidcon 2016
Crafting Great Hypotheses - Droidcon 2016Crafting Great Hypotheses - Droidcon 2016
Crafting Great Hypotheses - Droidcon 2016
 
A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...A realtime infrastructure for Android apps: Firebase may be what you need..an...
A realtime infrastructure for Android apps: Firebase may be what you need..an...
 
Add ClassyShark to your Android toolbox
Add ClassyShark to your Android toolboxAdd ClassyShark to your Android toolbox
Add ClassyShark to your Android toolbox
 
Data Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternData Binding in Action using MVVM pattern
Data Binding in Action using MVVM pattern
 
World-Class Testing Development Pipeline for Android
 World-Class Testing Development Pipeline for Android World-Class Testing Development Pipeline for Android
World-Class Testing Development Pipeline for Android
 
Building maintainable app
Building maintainable appBuilding maintainable app
Building maintainable app
 
Engage and retain users in the android world - Droidcon Italy 2016
Engage and retain users in the android world - Droidcon Italy 2016Engage and retain users in the android world - Droidcon Italy 2016
Engage and retain users in the android world - Droidcon Italy 2016
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeed
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
 

Ähnlich wie Evolving the Android Core with Aspects

Frontend architecture on big and small sites
Frontend architecture on big and small sitesFrontend architecture on big and small sites
Frontend architecture on big and small sitesToni Pinel
 
rpm-building-101.pdf
rpm-building-101.pdfrpm-building-101.pdf
rpm-building-101.pdfstroganovboris
 
Create Custom Post Type Plugin
Create Custom Post Type PluginCreate Custom Post Type Plugin
Create Custom Post Type PluginJan Wilson
 
Spacebrew MADess: Running Your Own Server
Spacebrew MADess: Running Your Own ServerSpacebrew MADess: Running Your Own Server
Spacebrew MADess: Running Your Own ServerJulio Terra
 
From simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauFrom simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauSergii Khomenko
 
Modeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frModeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frCĂ©dric Brun
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldCĂ©dric Brun
 
Asynchronous data processing
Asynchronous data processingAsynchronous data processing
Asynchronous data processingAndrea Giuliano
 
Ultra Basic Guide to Photography
Ultra Basic Guide to PhotographyUltra Basic Guide to Photography
Ultra Basic Guide to PhotographyOwen Wang
 
Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015Fastly
 
Geb for Testing Your Grails Application GR8Conf India 2016
Geb for Testing Your Grails Application  GR8Conf India 2016Geb for Testing Your Grails Application  GR8Conf India 2016
Geb for Testing Your Grails Application GR8Conf India 2016Jacob Aae Mikkelsen
 
Sahana castle restaurant menu
Sahana castle restaurant menuSahana castle restaurant menu
Sahana castle restaurant menuMani Krishna
 
Geb for browser automation
Geb for browser automationGeb for browser automation
Geb for browser automationJacob Aae Mikkelsen
 
CENTROS COMERCIALES COSTA J&M
CENTROS COMERCIALES COSTA J&MCENTROS COMERCIALES COSTA J&M
CENTROS COMERCIALES COSTA J&MJ&M Comunicaciones
 
C.C CARNAVAL DE BARRANQUILLA 2020
C.C CARNAVAL DE BARRANQUILLA 2020C.C CARNAVAL DE BARRANQUILLA 2020
C.C CARNAVAL DE BARRANQUILLA 2020J&M Comunicaciones
 
People + Machines
People + MachinesPeople + Machines
People + MachinesDigiday
 
PyData Barcelona - weather and climate data
PyData Barcelona - weather and climate dataPyData Barcelona - weather and climate data
PyData Barcelona - weather and climate dataMargriet Groenendijk
 
ISDS in APEC region the record
ISDS in APEC region   the recordISDS in APEC region   the record
ISDS in APEC region the recordMartina F. Ferracane
 
Pane'ramik - Effective Marketing with Video
Pane'ramik - Effective Marketing with VideoPane'ramik - Effective Marketing with Video
Pane'ramik - Effective Marketing with VideoBlake Rea
 

Ähnlich wie Evolving the Android Core with Aspects (20)

Frontend architecture on big and small sites
Frontend architecture on big and small sitesFrontend architecture on big and small sites
Frontend architecture on big and small sites
 
rpm-building-101.pdf
rpm-building-101.pdfrpm-building-101.pdf
rpm-building-101.pdf
 
Create Custom Post Type Plugin
Create Custom Post Type PluginCreate Custom Post Type Plugin
Create Custom Post Type Plugin
 
Spacebrew MADess: Running Your Own Server
Spacebrew MADess: Running Your Own ServerSpacebrew MADess: Running Your Own Server
Spacebrew MADess: Running Your Own Server
 
From simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with TableauFrom simple to more advanced: Lessons learned in 13 months with Tableau
From simple to more advanced: Lessons learned in 13 months with Tableau
 
Ford ranger xlt
Ford   ranger xltFord   ranger xlt
Ford ranger xlt
 
Modeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ frModeling avengers – open source technology mix for saving the world econ fr
Modeling avengers – open source technology mix for saving the world econ fr
 
Modeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the worldModeling avengers – open source technology mix for saving the world
Modeling avengers – open source technology mix for saving the world
 
Asynchronous data processing
Asynchronous data processingAsynchronous data processing
Asynchronous data processing
 
Ultra Basic Guide to Photography
Ultra Basic Guide to PhotographyUltra Basic Guide to Photography
Ultra Basic Guide to Photography
 
Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015
 
Geb for Testing Your Grails Application GR8Conf India 2016
Geb for Testing Your Grails Application  GR8Conf India 2016Geb for Testing Your Grails Application  GR8Conf India 2016
Geb for Testing Your Grails Application GR8Conf India 2016
 
Sahana castle restaurant menu
Sahana castle restaurant menuSahana castle restaurant menu
Sahana castle restaurant menu
 
Geb for browser automation
Geb for browser automationGeb for browser automation
Geb for browser automation
 
CENTROS COMERCIALES COSTA J&M
CENTROS COMERCIALES COSTA J&MCENTROS COMERCIALES COSTA J&M
CENTROS COMERCIALES COSTA J&M
 
C.C CARNAVAL DE BARRANQUILLA 2020
C.C CARNAVAL DE BARRANQUILLA 2020C.C CARNAVAL DE BARRANQUILLA 2020
C.C CARNAVAL DE BARRANQUILLA 2020
 
People + Machines
People + MachinesPeople + Machines
People + Machines
 
PyData Barcelona - weather and climate data
PyData Barcelona - weather and climate dataPyData Barcelona - weather and climate data
PyData Barcelona - weather and climate data
 
ISDS in APEC region the record
ISDS in APEC region   the recordISDS in APEC region   the record
ISDS in APEC region the record
 
Pane'ramik - Effective Marketing with Video
Pane'ramik - Effective Marketing with VideoPane'ramik - Effective Marketing with Video
Pane'ramik - Effective Marketing with Video
 

KĂŒrzlich hochgeladen

CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto GonzĂĄlez Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

KĂŒrzlich hochgeladen (20)

CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➄8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂
CALL ON ➄8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

Evolving the Android Core with Aspects

  • 1. Carlo Pescio @CarloPescio http://aspectroid.com Carlo Pescio Evolving the Android Core with Aspects
  • 2. Carlo Pescio @CarloPescio http://aspectroid.com Android on custom devices New hardware: - Ethernet - TV tuner - Modbus Different target / product line / market: - Not a “personal device” - Keeping “user data” not an option - USB devices should autostart apps w/out asking user - Foreground app can’t win - Change low memory policies
  • 4. Carlo Pescio @CarloPescio http://aspectroid.com AudioManager int mBecomingNoisyIntentDevices = AudioSystem.DEVICE_OUT_WIRED_HEADSET | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE | AudioSystem.DEVICE_OUT_ALL_A2DP | AudioSystem.DEVICE_OUT_HDMI | AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET | AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET | AudioSystem.DEVICE_OUT_ALL_USB | AudioSystem.DEVICE_OUT_LINE;
  • 5. Carlo Pescio @CarloPescio http://aspectroid.com AudioManager private void onSetWiredDeviceConnectionState(int device, int state, String name) { synchronized (mConnectedDevices) { if((state == 0) && ((device == AudioSystem.DEVICE_OUT_WIRED_HEADSET) || (device == AudioSystem.DEVICE_OUT_WIRED_HEADPHONE)|| (device == AudioSystem.DEVICE_OUT_LINE))) { setBluetoothA2dpOnInt(true); } boolean isUsb = ((device & ~AudioSystem.DEVICE_OUT_ALL_USB) == 0) || (((device & AudioSystem.DEVICE_BIT_IN) != 0) && ((device & ~AudioSystem.DEVICE_IN_ALL_USB) == 0)); handleDeviceConnection((state == 1), device, (isUsb ? name : "")); if (state != 0) { if ((device == AudioSystem.DEVICE_OUT_WIRED_HEADSET) || (device == AudioSystem.DEVICE_OUT_WIRED_HEADPHONE) || (device == AudioSystem.DEVICE_OUT_LINE)) { setBluetoothA2dpOnInt(false); }
  • 6. Carlo Pescio @CarloPescio http://aspectroid.com Evolving open source code Plugin architecture: lucky you Or: just fork & change the damn code pull + 3 way compare ‱ Feature / Artifact symmetry is broken ‱ Features are scattered in small patches ‱ Product families => multiple forks
  • 7. Carlo Pescio @CarloPescio http://aspectroid.com aspectroid exploring the aspect-oriented design space
  • 8. Carlo Pescio @CarloPescio http://aspectroid.com Aspect Orientation Born to address Cross-Cutting, Scattered Concerns Error handling, Transaction handling Not very successful so far No design discipline evolved Core features: Customize behavior w/out changing code Avoid scattering a single concern around
  • 9. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ crash course Inter-type declaration: add data members, member functions, implement interfaces, 
 aspect ScreenStateSettingsAspect { private CheckBoxPreference DevelopmentSettings.stayOnPreference; }
  • 10. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ crash course Pointcut (the “where”) identify matching parts of code (sophisticated syntax) pointcut settingsUpdated() : execution( private void PowerManagerService.updateStayOnLocked(int)); pointcut adbSet() : within(UsbDeviceManager) && set(boolean *.mAdbEnabled);
  • 11. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ crash course Advice (the when and how) execute code before / after / around code matched by a pointcut (join point) after(boolean newVal) : adbSet() && args(newVal) { // do something here }
  • 12. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ crash course Aspect scoping mechanism; also: artifact privileged aspect ScreenStatePowerAspect { 
 inter-type declarations 
 pointcuts 
 advices 
 functions 
 data }
  • 13. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ & Android Apps: easy download plugin, add AspectJ nature to project Core: not so easy Shell calling Makefiles calling Python calling make Strong expectations (class files etc.) AJC can compile regular Java files aspects don’t need .aj extension, .java is ok
  • 14. Carlo Pescio @CarloPescio http://aspectroid.com AspectJ in the core - Create a compiler wrapper around ajc in C - Standardizes options and behavior - Like: files in a file list must have absolute path - Minimal changes to the build scripts - If you link with the aspectjrt library, I call the compiler wrapper - Applicable to other JVM languages
  • 15. # C o m m o n d e f i n i t i o n t o i n v o k e j a v a c o n t h e h o s t a n d t a r g e t . # # S o m e h i s t o r i c a l n o t e s : # - b e l o w w e w r i t e t h e l i s t o f j a v a f i l e s t o j a v a - s o u r c e - l i s t t o a v o i d a r g u m e n t # l i s t l e n g t h p r o b l e m s w i t h C y g w i n # - w e f i l t e r o u t d u p l i c a t e j a v a f i l e n a m e s b e c a u s e e c l i p s e ' s c o m p i l e r # d o e s n ' t l i k e t h e m . # # $ ( 1 ) : j a v a c # $ ( 2 ) : b o o t c l a s s p a t h d e f i n e c o m p i l e - j a v a $ ( h i d e ) r m - f $ @ $ ( h i d e ) r m - r f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) $ ( h i d e ) m k d i r - p $ ( d i r $ @ ) $ ( h i d e ) m k d i r - p $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) $ ( c a l l u n z i p - j a r - f i l e s , $ ( P R I V A T E _ S T A T I C _ J A V A _ L I B R A R I E S ) , $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ) $ ( c a l l d u m p - w o r d s - t o - f i l e , $ ( P R I V A T E _ J A V A _ S O U R C E S ) , $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t ) $ ( h i d e ) i f [ - d " $ ( P R I V A T E _ S O U R C E _ I N T E R M E D I A T E S _ D I R ) " ] ; t h e n f i n d $ ( P R I V A T E _ S O U R C E _ I N T E R M E D I A T E S _ D I R ) - n a m e ' * . j a v a ' > > $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t ; f i $ ( h i d e ) t r ' ' ' n ' < $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t | s o r t - u > $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q $ ( h i d e ) i f [ - s $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q ] ; t h e n $ ( i f $ ( f i n d s t r i n g a s p e c t j r t , $ ( P R I V A T E _ S T A T I C _ J A V A _ L I B R A R I E S ) ) , $ ( s u b s t j a v a c , a j c w , $ ( 1 ) ) , $ ( 1 ) ) - e n c o d i n g U T F - 8 $ ( s t r i p $ ( P R I V A T E _ J A V A C _ D E B U G _ F L A G S ) ) $ ( i f $ ( f i n d s t r i n g t r u e , $ ( P R I V A T E _ W A R N I N G S _ E N A B L E ) ) , $ ( x l i n t _ u n c h e c k e d ) , ) $ ( 2 ) $ ( a d d p r e f i x - c l a s s p a t h , $ ( s t r i p $ ( c a l l n o r m a l i z e - p a t h - l i s t , $ ( P R I V A T E _ A L L _ J A V A _ L I B R A R I E S ) ) ) ) $ ( i f $ ( f i n d s t r i n g t r u e , $ ( P R I V A T E _ W A R N I N G S _ E N A B L E ) ) , $ ( x l i n t _ u n c h e c k e d ) , ) - e x t d i r s " " - d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) $ ( P R I V A T E _ J A V A C F L A G S ) @ $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q | | ( r m - r f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ; e x i t 4 1 ) f i $ ( i f $ ( P R I V A T E _ J A V A _ L A Y E R S _ F I L E ) , $ ( h i d e ) b u i l d / t o o l s / j a v a - l a y e r s . p y $ ( P R I V A T E _ J A V A _ L A Y E R S _ F I L E ) @ $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q , ) $ ( h i d e ) r m - f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t $ ( h i d e ) r m - f $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / j a v a - s o u r c e - l i s t - u n i q $ ( i f $ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) , $ ( h i d e ) f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) - n a m e $ ( w o r d 1 , $ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) ) $ ( a d d p r e f i x - o - n a m e , $ ( w o r d l i s t 2 , 9 9 9 , $ ( P R I V A T E _ J A R _ E X C L U D E _ F I L E S ) ) ) | x a r g s r m - r f ) $ ( i f $ ( P R I V A T E _ J A R _ P A C K A G E S ) , $ ( h i d e ) f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) - m i n d e p t h 1 - t y p e f $ ( f o r e a c h p k g , $ ( P R I V A T E _ J A R _ P A C K A G E S ) , - n o t - p a t h $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / $ ( s u b s t . , / , $ ( p k g ) ) / * ) - d e l e t e ; f i n d $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) - e m p t y - d e l e t e ) $ ( i f $ ( P R I V A T E _ J A R _ E X C L U D E _ P A C K A G E S ) , $ ( h i d e ) r m - r f $ ( f o r e a c h p k g , $ ( P R I V A T E _ J A R _ E X C L U D E _ P A C K A G E S ) , $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) / $ ( s u b s t . , / , $ ( p k g ) ) ) ) $ ( i f $ ( P R I V A T E _ R M T Y P E D E F S ) , $ ( h i d e ) $ ( R M T Y P E D E F S ) - v $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) ) $ ( i f $ ( P R I V A T E _ J A R _ M A N I F E S T ) , $ ( h i d e ) s e d - e ' s / % B U I L D _ N U M B E R % / $ ( B U I L D _ N U M B E R ) / ' $ ( P R I V A T E _ J A R _ M A N I F E S T ) > $ ( d i r $ @ ) / m a n i f e s t . m f & & j a r - c f m $ @ $ ( d i r $ @ ) / m a n i f e s t . m f - C $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) . , $ ( h i d e ) j a r - c f $ @ - C $ ( P R I V A T E _ C L A S S _ I N T E R M E D I A T E S _ D I R ) . ) e n d e f AspectJ in the core Definitions.mk -> define compile-java $(if $(findstring aspectjrt, $(PRIVATE_STATIC_JAVA_LIBRARIES)), $(subst javac,ajcw,$(1)), $(1))
  • 16. Does it actually work? Add a useful feature without changing sources
  • 17. Carlo Pescio @CarloPescio http://aspectroid.com How do we start? ‱ Explore code ‱ “Stay on while charging” ‱ UsbDeviceManager, PowerManagerService ‱ See ebook for details on the quest ‱ Tested as much as possible outside the core ‱ See ebook again ‱ Add aspects ‱ Make aspects robust !
  • 18. A map
  • 19. A map
  • 20. A map
  • 21. A map
  • 22. Carlo Pescio @CarloPescio http://aspectroid.com Extend the Settings app - Add a new checkbox - Persist the checkbox state somewhere - Show the persisted value on resume
  • 23. Settings Aspect (1/3) privileged aspect ScreenStateSettingsAspect { private CheckBoxPreference DevelopmentSettings.stayOnPreference; pointcut onCreateExecuted() : execution(public void DevelopmentSettings.onCreate(..)) ; pointcut onResumeExecuted() : execution(public void DevelopmentSettings.onResume(..)) ;
  • 24. Settings Aspect (2/3) after(DevelopmentSettings self):onCreateExecuted()&&target(self) { final Context ctx = self.getActivity(); PreferenceCategory targetCategory = (PreferenceCategory)self. findPreference(DevelopmentSettings.DEBUG_DEBUGGING_CATEGORY_KEY); self.stayOnPreference = new CheckBoxPreference(ctx); self.stayOnPreference.setKey("aspectroidScreenState"); self.stayOnPreference.setTitle("Prevent sleeping while debugging"); self.stayOnPreference.setSummary("only for usb debugging"); targetCategory.addPreference(self.stayOnPreference); self.stayOnPreference.setOnPreferenceChangeListener( new OnPreferenceChangeListener() { public boolean onPreferenceChange( Preference preference, Object newValue) { API.persistPreference(ctx, (Boolean) newValue); return true; } }); }
  • 25. Settings Aspect (3/3) after(DevelopmentSettings self) : onResumeExecuted() && target(self) { final Context ctx = self.getActivity(); boolean on = API.retrievePreference(ctx); self.stayOnPreference.setChecked(on); } } 
  • 26. Carlo Pescio @CarloPescio http://aspectroid.com Am I debugging? - USB debugging enabled - USB connected to a computer - Not just charging - Not in OTG / host mode
  • 27. Carlo Pescio @CarloPescio http://aspectroid.com UsbDeviceManager See ebook for details
  • 28. USB Aspect (1/3) aspect ScreenStateUsbAspect { boolean adbEnabled = false; boolean adbConnected = false; Context context; before(Context ctx): execution(UsbDeviceManager.new(Context)) && args( ctx ) { context = ctx; }
  • 29. USB Aspect (2/3) pointcut adbSet() : within(UsbDeviceManager) && set(boolean *.mAdbEnabled); after(boolean newVal) : adbSet() && args(newVal) { adbEnabled = newVal; checkAdbOn(); }
  • 30. USB Aspect (3/3) pointcut connectedSet() : within(UsbDeviceManager) && set(boolean *.mConnected); after(boolean newVal) : connectedSet() && args(newVal) { adbConnected = newVal; checkAdbOn(); } void checkAdbOn() { boolean isOn = adbEnabled && adbConnected; API.storeAdbState(context, isOn); } } 
  • 31. PowerManagerService (1) public void systemReady(IAppOpsService appOps) { // 
 final ContentResolver resolver = mContext.getContentResolver(); // 
 resolver.registerContentObserver( Settings.Global.getUriFor( Settings.Global.STAY_ON_WHILE_PLUGGED_IN), false, mSettingsObserver, UserHandle.USER_ALL); //
 updateSettingsLocked(); //
 }
  • 32. PowerManagerService (2) private void updateStayOnLocked(int dirty) { if( (dirty & (DIRTY_BATTERY_STATE | DIRTY_SETTINGS)) != 0 ) { final boolean wasStayOn = mStayOn; if( mStayOnWhilePluggedInSetting != 0 && ! isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()){ mStayOn = mBatteryManagerInternal.isPowered( mStayOnWhilePluggedInSetting); } else { mStayOn = false; } if( mStayOn != wasStayOn ) { mDirty |= DIRTY_STAY_ON; } } }
  • 33. Power Aspect (1/2) privileged aspect ScreenStatePowerAspect { pointcut systemReadyExecuted() : execution( public void PowerManagerService.systemReady(..)); after(PowerManagerService self) : systemReadyExecuted() && target(self) { API.registerScreenOnObserver(self.mContext, self.mSettingsObserver); }
  • 34. Power Aspect (2/2) pointcut settingsUpdated() : execution( private void PowerManagerService.updateStayOnLocked(int)); void around(PowerManagerService self, int dirty) : settingsUpdated() && args(dirty) && target(self) { proceed(self, dirty); boolean keepOn = API.shouldKeepScrenOn(self.mContext); if( keepOn && !self.mStayOn ) { self.mStayOn = true; self.mDirty |= PowerManagerService.DIRTY_STAY_ON; } } } 
  • 35. Carlo Pescio @CarloPescio http://aspectroid.com Is it worth doing? Core of science: experiments & falsifiability port the aspects from 5.0 to 6.0 Hardest candidate: PowerManagerService Power mgmt changed in 6.0 to include Doze Also the most fragile of my aspects
  • 36. Carlo Pescio @CarloPescio http://aspectroid.com File compare map 5.0 vs 6.0
  • 37. Carlo Pescio @CarloPescio http://aspectroid.com Still working? Class: PowerManagerService still there Member functions: systemReady updateStayOnLocked Data members: mContext, mSettingsObserver, mStayOn, mDirty still there, same purpose & signature still there, same purpose 
  • 38. Carlo Pescio @CarloPescio http://aspectroid.com Conclusions: core benefits - Feature traceability and selection - Features as artifacts, not changesets - Simplified maintenance / porting
  • 39. Carlo Pescio @CarloPescio http://aspectroid.com Challenges Aspectj is still “one project at a time” Core is not aspect-friendly very long methods, hard to pointcut inside Core itself would actually benefit A LOT from AOP ok google?  Rejection of the unfamiliar 3-way compare is a known pain branch X product in a product family is a known pain
  • 40. Carlo Pescio @CarloPescio http://aspectroid.com Why learning this stuff? - New ways to solve problems Customize FOSS by adding code - New ways to structure your code aspect-friendly mix OOP and AOP - In the end: you maintain LESS code [good] aspects can be quite resilient
  • 41. Carlo Pescio @CarloPescio http://aspectroid.com Get in touch carlo.pescio@gmail.com @CarloPescio http://eptacom.net http://aspectroid.com