본문

170613(화) - Android 6.0 Changes

Android 6.0 Changes


Runtime Permissions

- 사용자는 설치된 앱에 대해서 개별적으로 permission을 grant 하거나 revoke 할 수 있다.

checkSelfPermission()

requestPermissions()



Doze and App Standby

- Doze

- power-saving optimizations 도입

- unplugs and screen off for a period time, device goes into Doze mode. and then, keep the System in a sleep state.

- periodically resume normal operations -> app syncing, System perform pending operations.


- App Standby

- 사용자가 app을 actively using 하지 않을때 app이 idle 상태인지 확인 가능

- System makes determination : user does not touch the app for period of time.

- unplugged

- disables system network  

- suspends syncs and jobs for idle app.



Apache HTTP Client Removal

- remove Apache HTTP client support

- instead HttpURLConnection

- reduces network, minimizes power consumption.

- if keep going Apache


android {
    useLibrary
'org.apache.http.legacy'
}



BoringSSL

- android는 openSSL -> BorringSSL로 옮겨가고 있다.

- NDK를 사용한다면 API가 아닌 다른 cryptographic libraries를 사용하지 않아야 한다. 



Access to Hardware Identifier

- programmatic 한 방법인  WifiInfo.getMacAddress() 와 BluetoothAdapter.getAddress() 으로 hardware identifier에 접근하지 못하도록 했다. (return 02:00:00:00:00:00)


-  Access하려면  ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission이 있어야 한다.



Notifications

Notification.Builder class를 사용해서 notification을 구성해야한다.



AudioManager Changes

- AudioManager로 직접 muting 하거나 volume을 조절하는 것은 더이상 지원하지 않음.

requestAudioFocus() 를 대신 사용해야 한다.

adjustStreamVolume()



Text Selection

- custom floating toolbar 출력 가능


1. View 또는 Activity에서 ActionMode를 startActionMode(Callback) -> startActionMode(Callback, ActionMode.TYPE_FLATING) 으로 변경.


2. make extend ActionMode.Callback2

3. override onGetContentRect() method and coordinates of the content Rect object 

4. rect position이 유효하지 않으면 invalidateContentRect() 호출



Browser Bookmark Changes

- remove global bookmarks

- remove android.provider.Browser.getAllBookmarks() and android.provider.Browser.saveBookmark() 

- should store bookmarks data internally.



Android Keystore Changes

- not support DSA.

- still support ECDSA.

- 암호화가 필요하지 않은 키는 더이상 삭제되지 않는다. (ex : 보안잠금화면 비활성화, 재설정)

- 암호화가 필요한 키는 event 중에 삭제



Wi-Fi and Networking Changes

- 이전에는 Wi-Fi 연결시 sellular data 같은 network와 끊어져  버렸다.

- this release에서는 device는 다른 네트워크와의 연결을 끊지 않는다.

- targetsdk가 21 이상이면, multinetwork API 제공 openConnection()bindSocket()bindProcessToNetwork()  



Camera Service Changes

- first come, first serve -> high-priority processes favored.

- user-visible or foreground activities는 우선순위가 높다.

- 낮은 우선순위의 client가 camera를 사용하려고 하면 evicted 된다.

- process를 동시에 열고 카메라 장치를 동시 사용 가능

- multi-process로 카메라를 열면(성능이 크게 저하) camera service가 이를 캐치하여 disallowed 한다.

- account를 변경하면 이전 user account 의 camera client가 evicted 된다.



Runtime

- ART runtime은 이제 newInstance() 메소드의 rule을 올바르게 implements 한다. 이 변경사항은 Dalvik이 이전 버전에서 access rule를 잘못 checking 하고 있는 문제를 수정한다.


- dynamic linker의 동작 수정. linker는 library's soname과 path의 차이를 이해하고 soname에 의한 검색이 implemented 된다.

- dlopen(3) RTLD_LOCAL flag가 올바르게 implemented 되었다.

 


APK Validation

- platform이 APK에 대해서 stricter validation을 진행한다.



USB Connection

- USB port를 통한 연결은 default로 charge-only mode가 된다.

- file transition은 명시적으로 설정해야 한다.

공유

댓글