Skip to content

Commit

Permalink
Merge pull request omnirom#10 from omnirom/android-6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
omnirom-mtk committed Jun 10, 2016
2 parents 781a8d6 + f2a5ddd commit a911c84
Show file tree
Hide file tree
Showing 36 changed files with 3,112 additions and 165 deletions.
12 changes: 12 additions & 0 deletions core/java/android/provider/Settings.java
Expand Up @@ -2463,6 +2463,18 @@ public boolean validate(String value) {
*/
public static final String DOZE_PULSE_DURATION_OUT = "doze_pulse_duration_out";

/**
* Define if screenshot crop & share is active
* @hide
*/
public static final String SCREENSHOT_CROP_AND_SHARE = "screenshot_crop_and_share";

/**
* Define the crop behavior of screenshot crop & share
* @hide
*/
public static final String SCREENSHOT_CROP_BEHAVIOR = "screenshot_crop_behavior";

/**
* Pulse if there is notifications for ambient display
* @hide
Expand Down
15 changes: 15 additions & 0 deletions core/java/android/view/MotionEvent.java
Expand Up @@ -416,6 +416,21 @@ public final class MotionEvent extends InputEvent implements Parcelable {
*/
public static final int FLAG_WINDOW_IS_OBSCURED = 0x1;

/**
* This flag indicates that the window that received this motion event is partly
* or wholly obscured by another visible window above it. This flag is set to true
* even if the event did not directly pass through the obscured area.
* A security sensitive application can check this flag to identify situations in which
* a malicious application may have covered up part of its content for the purpose
* of misleading the user or hijacking touches. An appropriate response might be
* to drop the suspect touches or to take additional precautions to confirm the user's
* actual intent.
*
* Unlike FLAG_WINDOW_IS_OBSCURED, this is actually true.
* @hide
*/
public static final int FLAG_WINDOW_IS_PARTIALLY_OBSCURED = 0x2;

/**
* Private flag that indicates when the system has detected that this motion event
* may be inconsistent with respect to the sequence of previously delivered motion events,
Expand Down
1 change: 1 addition & 0 deletions packages/Keyguard/src/com/android/keyguard/NumPadKey.java
Expand Up @@ -124,6 +124,7 @@ public void createNumKeyPad(boolean enableRandom) {
String klondike = sKlondike[mDigit];
final int len = klondike.length();
if (len > 0) {
mKlondikeText.setVisibility(View.VISIBLE);
mKlondikeText.setText(klondike);
} else {
mKlondikeText.setVisibility(View.INVISIBLE);
Expand Down
6 changes: 6 additions & 0 deletions packages/SystemUI/AndroidManifest.xml
Expand Up @@ -453,5 +453,11 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<service
android:name=".screenshot.ScreenshotEditor"
android:enabled="true"
android:exported="true" />

</application>
</manifest>
11 changes: 11 additions & 0 deletions packages/SystemUI/res/anim/crop_in.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator" >

<alpha
android:fromAlpha="0"
android:toAlpha="1"
android:duration="500" >
</alpha>

</set>
12 changes: 12 additions & 0 deletions packages/SystemUI/res/anim/crop_out.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator" >

<alpha
android:startOffset="0"
android:fromAlpha="1"
android:toAlpha="0"
android:duration="500" >
</alpha>

</set>
24 changes: 24 additions & 0 deletions packages/SystemUI/res/drawable/cropper_bg.xml
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The OmniROM Project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@android:color/white" />
<stroke
android:width="2dp"
android:color="#40000000" />
</shape>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_action_visibility.xml
@@ -0,0 +1,8 @@
<!-- drawable/eye.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_image_crop.xml
@@ -0,0 +1,8 @@
<!-- drawable/crop.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M7,17V1H5V5H1V7H5V17A2,2 0 0,0 7,19H17V23H19V19H23V17M17,15H19V7C19,5.89 18.1,5 17,5H9V7H17V15Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_image_crop_circle.xml
@@ -0,0 +1,8 @@
<!-- drawable/panorama_fisheye.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2C6.47,2 2,6.47 2,12C2,17.53 6.47,22 12,22C17.53,22 22,17.53 22,12C22,6.47 17.53,2 12,2Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_image_crop_free.xml
@@ -0,0 +1,8 @@
<!-- drawable/crop_free.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M19,3H15V5H19V9H21V5C21,3.89 20.1,3 19,3M19,19H15V21H19A2,2 0 0,0 21,19V15H19M5,15H3V19A2,2 0 0,0 5,21H9V19H5M3,5V9H5V5H9V3H5A2,2 0 0,0 3,5Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_image_crop_square.xml
@@ -0,0 +1,8 @@
<!-- drawable/crop_square.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M18,18H6V6H18M18,4H6A2,2 0 0,0 4,6V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18V6C20,4.89 19.1,4 18,4Z" />
</vector>
14 changes: 14 additions & 0 deletions packages/SystemUI/res/drawable/ic_image_edit.xml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="30dp"
android:height="30dp"
android:viewportWidth="48"
android:viewportHeight="48">

<path
android:fillColor="#ffffff"
android:pathData="M14,28c-3.31,0-6,2.689-6,6c0,2.62-2.31,4-4,4c1.84,
2.439,4.99,4,8,4c4.42,0,8-3.58,8-8C20,30.689,17.31,28,14,28Z
M41.41,9.26l-2.67-2.67c-0.78-0.78-2.051-0.78-2.83,0L18,
24.5l5.5,5.5l17.91-17.91C42.2,11.3,42.2,10.04,41.41,9.26z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_menu_done.xml
@@ -0,0 +1,8 @@
<!-- drawable/check.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#ffffff" android:pathData="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_menu_recover.xml
@@ -0,0 +1,8 @@
<!-- drawable/backup_restore.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" />
</vector>
8 changes: 8 additions & 0 deletions packages/SystemUI/res/drawable/ic_menu_save.xml
@@ -0,0 +1,8 @@
<!-- drawable/content_save.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
</vector>
24 changes: 24 additions & 0 deletions packages/SystemUI/res/drawable/ic_screenshot_share_white.xml
@@ -0,0 +1,24 @@
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:fillColor="#ffffff"
android:pathData="M36,32.17c-1.52,0 -2.89,0.59 -3.93,1.54L17.82,25.4c0.11,-0.45 0.18,-0.92 0.18,-1.4s-0.07,-0.95 -0.18,-1.4l14.1,-8.23c1.07,1 2.5,1.62 4.08,1.62 3.31,0 6,-2.69 6,-6s-2.69,-6 -6,-6 -6,2.69 -6,6c0,0.48 0.07,0.95 0.18,1.4l-14.1,8.23c-1.07,-1 -2.5,-1.62 -4.08,-1.62 -3.31,0 -6,2.69 -6,6s2.69,6 6,6c1.58,0 3.01,-0.62 4.08,-1.62l14.25,8.31c-0.1,0.42 -0.16,0.86 -0.16,1.31 0,3.22 2.61,5.83 5.83,5.83s5.83,-2.61 5.83,-5.83 -2.61,-5.83 -5.83,-5.83z"/>
</vector>
20 changes: 20 additions & 0 deletions packages/SystemUI/res/drawable/ripple_dark.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The OmniROM Project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_material_light" >
</ripple>
5 changes: 5 additions & 0 deletions packages/SystemUI/res/drawable/selector_light.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:drawable="@drawable/ripple_dark" />
<item android:drawable="@android:color/white" />
</selector>
2 changes: 1 addition & 1 deletion packages/SystemUI/res/drawable/stat_notify_image.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2015 The CyanogenMod Project
Expand Down
2 changes: 1 addition & 1 deletion packages/SystemUI/res/drawable/stat_notify_image_error.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2015 The CyanogenMod Project
Expand Down
56 changes: 28 additions & 28 deletions packages/SystemUI/res/drawable/stat_sys_dnd_important.xml
@@ -1,28 +1,28 @@
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="2.5dp"
android:insetRight="2.5dp">
<vector android:width="17dp"
android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">

<path
android:fillColor="#FFFFFFFF"
android:pathData="M16.23,18L12,15.45L7.77,18L8.89,13.19L5.16,9.96L10.08,9.54L12,5L13.92,9.53L18.84,9.95L15.11,13.18L16.23,18M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
</vector>
</inset>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="2.5dp"
android:insetRight="2.5dp">
<vector android:width="17dp"
android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">

<path
android:fillColor="#FFFFFFFF"
android:pathData="M16.23,18L12,15.45L7.77,18L8.89,13.19L5.16,9.96L10.08,9.54L12,5L13.92,9.53L18.84,9.95L15.11,13.18L16.23,18M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
</vector>
</inset>

0 comments on commit a911c84

Please sign in to comment.